aboutsummaryrefslogtreecommitdiff
path: root/src/nse/gnunet-service-nse.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-19 21:25:50 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-19 21:30:25 +0200
commit2111b3716776f2a1e6e6b38888c8dea42907c09d (patch)
tree325c76317c007e2af7533488a31e410518f0ab18 /src/nse/gnunet-service-nse.c
parent9baf882d7642f8aeac734ffd16c8e94bd409a41b (diff)
downloadgnunet-2111b3716776f2a1e6e6b38888c8dea42907c09d.tar.gz
gnunet-2111b3716776f2a1e6e6b38888c8dea42907c09d.zip
fix compiler warnings about unused args
Diffstat (limited to 'src/nse/gnunet-service-nse.c')
-rw-r--r--src/nse/gnunet-service-nse.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 09316dbcf..fd83d2b67 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -430,6 +430,7 @@ handle_start (void *cls, const struct GNUNET_MessageHeader *message)
430 struct GNUNET_NSE_ClientMessage em; 430 struct GNUNET_NSE_ClientMessage em;
431 struct GNUNET_MQ_Envelope *env; 431 struct GNUNET_MQ_Envelope *env;
432 432
433 (void) message;
433 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received START message from client\n"); 434 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received START message from client\n");
434 mq = GNUNET_SERVICE_client_get_mq (client); 435 mq = GNUNET_SERVICE_client_get_mq (client);
435 GNUNET_notification_context_add (nc, mq); 436 GNUNET_notification_context_add (nc, mq);
@@ -717,6 +718,8 @@ schedule_current_round (void *cls,
717 struct NSEPeerEntry *peer_entry = value; 718 struct NSEPeerEntry *peer_entry = value;
718 struct GNUNET_TIME_Relative delay; 719 struct GNUNET_TIME_Relative delay;
719 720
721 (void) cls;
722 (void) key;
720 if (NULL != peer_entry->transmit_task) 723 if (NULL != peer_entry->transmit_task)
721 { 724 {
722 GNUNET_SCHEDULER_cancel (peer_entry->transmit_task); 725 GNUNET_SCHEDULER_cancel (peer_entry->transmit_task);
@@ -749,8 +752,8 @@ static void
749update_flood_message (void *cls) 752update_flood_message (void *cls)
750{ 753{
751 struct GNUNET_TIME_Relative offset; 754 struct GNUNET_TIME_Relative offset;
752 unsigned int i;
753 755
756 (void) cls;
754 flood_task = NULL; 757 flood_task = NULL;
755 offset = GNUNET_TIME_absolute_get_remaining (next_timestamp); 758 offset = GNUNET_TIME_absolute_get_remaining (next_timestamp);
756 if (0 != offset.rel_value_us) 759 if (0 != offset.rel_value_us)
@@ -780,7 +783,7 @@ update_flood_message (void *cls)
780 setup_flood_message (estimate_index, current_timestamp); 783 setup_flood_message (estimate_index, current_timestamp);
781 next_message.matching_bits = htonl (0); /* reset for 'next' round */ 784 next_message.matching_bits = htonl (0); /* reset for 'next' round */
782 hop_count_max = 0; 785 hop_count_max = 0;
783 for (i = 0; i < HISTORY_SIZE; i++) 786 for (unsigned int i = 0; i < HISTORY_SIZE; i++)
784 hop_count_max = 787 hop_count_max =
785 GNUNET_MAX (ntohl (size_estimate_messages[i].hop_count), hop_count_max); 788 GNUNET_MAX (ntohl (size_estimate_messages[i].hop_count), hop_count_max);
786 GNUNET_CONTAINER_multipeermap_iterate (peers, &schedule_current_round, NULL); 789 GNUNET_CONTAINER_multipeermap_iterate (peers, &schedule_current_round, NULL);
@@ -869,6 +872,7 @@ find_proof (void *cls)
869 struct GNUNET_HashCode result; 872 struct GNUNET_HashCode result;
870 unsigned int i; 873 unsigned int i;
871 874
875 (void) cls;
872 proof_task = NULL; 876 proof_task = NULL;
873 GNUNET_memcpy (&buf[sizeof (uint64_t)], 877 GNUNET_memcpy (&buf[sizeof (uint64_t)],
874 &my_identity, 878 &my_identity,
@@ -967,6 +971,7 @@ update_flood_times (void *cls,
967 struct NSEPeerEntry *peer_entry = value; 971 struct NSEPeerEntry *peer_entry = value;
968 struct GNUNET_TIME_Relative delay; 972 struct GNUNET_TIME_Relative delay;
969 973
974 (void) key;
970 if (peer_entry == exclude) 975 if (peer_entry == exclude)
971 return GNUNET_OK; /* trigger of the update */ 976 return GNUNET_OK; /* trigger of the update */
972 if (GNUNET_NO == peer_entry->previous_round) 977 if (GNUNET_NO == peer_entry->previous_round)
@@ -1178,6 +1183,7 @@ handle_core_connect (void *cls,
1178{ 1183{
1179 struct NSEPeerEntry *peer_entry; 1184 struct NSEPeerEntry *peer_entry;
1180 1185
1186 (void) cls;
1181 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1187 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1182 "Peer `%s' connected to us\n", 1188 "Peer `%s' connected to us\n",
1183 GNUNET_i2s (peer)); 1189 GNUNET_i2s (peer));
@@ -1217,6 +1223,7 @@ handle_core_disconnect (void *cls,
1217{ 1223{
1218 struct NSEPeerEntry *pos = internal_cls; 1224 struct NSEPeerEntry *pos = internal_cls;
1219 1225
1226 (void) cls;
1220 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1221 "Peer `%s' disconnected from us\n", 1228 "Peer `%s' disconnected from us\n",
1222 GNUNET_i2s (peer)); 1229 GNUNET_i2s (peer));
@@ -1243,6 +1250,8 @@ handle_core_disconnect (void *cls,
1243static void 1250static void
1244flush_comp_cb (void *cls, size_t size) 1251flush_comp_cb (void *cls, size_t size)
1245{ 1252{
1253 (void) cls;
1254 (void) size;
1246 GNUNET_TESTBED_LOGGER_disconnect (lh); 1255 GNUNET_TESTBED_LOGGER_disconnect (lh);
1247 lh = NULL; 1256 lh = NULL;
1248} 1257}
@@ -1257,6 +1266,7 @@ flush_comp_cb (void *cls, size_t size)
1257static void 1266static void
1258shutdown_task (void *cls) 1267shutdown_task (void *cls)
1259{ 1268{
1269 (void) cls;
1260 if (NULL != flood_task) 1270 if (NULL != flood_task)
1261 { 1271 {
1262 GNUNET_SCHEDULER_cancel (flood_task); 1272 GNUNET_SCHEDULER_cancel (flood_task);
@@ -1324,6 +1334,7 @@ core_init (void *cls, const struct GNUNET_PeerIdentity *identity)
1324 struct GNUNET_TIME_Absolute now; 1334 struct GNUNET_TIME_Absolute now;
1325 struct GNUNET_TIME_Absolute prev_time; 1335 struct GNUNET_TIME_Absolute prev_time;
1326 1336
1337 (void) cls;
1327 if (NULL == identity) 1338 if (NULL == identity)
1328 { 1339 {
1329 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Connection to core FAILED!\n"); 1340 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Connection to core FAILED!\n");
@@ -1365,6 +1376,7 @@ core_init (void *cls, const struct GNUNET_PeerIdentity *identity)
1365static void 1376static void
1366status_cb (void *cls, int status) 1377status_cb (void *cls, int status)
1367{ 1378{
1379 (void) cls;
1368 logger_test = NULL; 1380 logger_test = NULL;
1369 if (GNUNET_YES != status) 1381 if (GNUNET_YES != status)
1370 { 1382 {
@@ -1402,6 +1414,8 @@ run (void *cls,
1402 char *proof; 1414 char *proof;
1403 struct GNUNET_CRYPTO_EddsaPrivateKey *pk; 1415 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
1404 1416
1417 (void) cls;
1418 (void) service;
1405 cfg = c; 1419 cfg = c;
1406 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (cfg, 1420 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (cfg,
1407 "NSE", 1421 "NSE",
@@ -1524,6 +1538,8 @@ client_connect_cb (void *cls,
1524 struct GNUNET_SERVICE_Client *c, 1538 struct GNUNET_SERVICE_Client *c,
1525 struct GNUNET_MQ_Handle *mq) 1539 struct GNUNET_MQ_Handle *mq)
1526{ 1540{
1541 (void) cls;
1542 (void) mq;
1527 return c; 1543 return c;
1528} 1544}
1529 1545
@@ -1540,6 +1556,7 @@ client_disconnect_cb (void *cls,
1540 struct GNUNET_SERVICE_Client *c, 1556 struct GNUNET_SERVICE_Client *c,
1541 void *internal_cls) 1557 void *internal_cls)
1542{ 1558{
1559 (void) cls;
1543 GNUNET_assert (c == internal_cls); 1560 GNUNET_assert (c == internal_cls);
1544} 1561}
1545 1562