From 33e87eb7680148006b7c9fc8f89040ad104597ea Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 19 Jun 2019 21:20:39 +0200 Subject: fix socket cmp, fix compiler warnings about unused args --- src/nse/gnunet-nse.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'src/nse/gnunet-nse.c') 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; } -- cgit v1.2.3