summaryrefslogtreecommitdiff
path: root/src/nse/gnunet-nse.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-19 21:20:39 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-19 21:20:39 +0200
commit33e87eb7680148006b7c9fc8f89040ad104597ea (patch)
treebee7bf0101ddd39a1fdeaa2e33d88e52be04e288 /src/nse/gnunet-nse.c
parenta31cd73472ac1b4c899a6e1d7e53851c20677f7d (diff)
fix socket cmp, fix compiler warnings about unused args
Diffstat (limited to 'src/nse/gnunet-nse.c')
-rw-r--r--src/nse/gnunet-nse.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/nse/gnunet-nse.c b/src/nse/gnunet-nse.c
index bf2fe11c3..c8ffa152e 100644
--- a/src/nse/gnunet-nse.c
+++ b/src/nse/gnunet-nse.c
@@ -46,6 +46,7 @@ static int status;
static void
do_shutdown (void *cls)
{
+ (void) cls;
if (NULL != nse)
{
GNUNET_NSE_disconnect (nse);
@@ -65,12 +66,14 @@ do_shutdown (void *cls)
*/
static void
handle_estimate (void *cls,
- struct GNUNET_TIME_Absolute timestamp,
+ struct GNUNET_TIME_Absolute timestamp,
double estimate,
- double std_dev)
+ double std_dev)
{
+ (void) cls;
status = 0;
- FPRINTF (stdout, "%llu %f %f %f\n",
+ FPRINTF (stdout,
+ "%llu %f %f %f\n",
(unsigned long long) timestamp.abs_value_us,
GNUNET_NSE_log_estimate_to_n (estimate),
estimate,
@@ -92,11 +95,11 @@ run (void *cls,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- nse = GNUNET_NSE_connect (cfg,
- &handle_estimate,
- NULL);
- GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
- NULL);
+ (void) cls;
+ (void) args;
+ (void) cfgfile;
+ nse = GNUNET_NSE_connect (cfg, &handle_estimate, NULL);
+ GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL);
}
@@ -106,22 +109,21 @@ run (void *cls,
* @return 0 on success
*/
int
-main (int argc,
- char *const *argv)
+main (int argc, char *const *argv)
{
static struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_END
- };
+ GNUNET_GETOPT_OPTION_END};
status = 1;
if (GNUNET_OK !=
GNUNET_PROGRAM_run (argc,
- argv,
- "gnunet-nse",
- gettext_noop
- ("Show network size estimates from NSE service."),
- options,
- &run, NULL))
+ argv,
+ "gnunet-nse",
+ gettext_noop (
+ "Show network size estimates from NSE service."),
+ options,
+ &run,
+ NULL))
return 2;
return status;
}