diff options
author | Philipp Tölke <toelke@in.tum.de> | 2011-06-15 07:15:40 +0000 |
---|---|---|
committer | Philipp Tölke <toelke@in.tum.de> | 2011-06-15 07:15:40 +0000 |
commit | e300436fe55b9d9c359fb99f5fbe9391150fddd0 (patch) | |
tree | c36eb28d294bcd57f7176721257536ee51f5a0ee /src/vpn/gnunet-daemon-vpn.c | |
parent | 238b4ac9407e047a7a2d6f0c951e70ef6e400d82 (diff) | |
download | gnunet-e300436fe55b9d9c359fb99f5fbe9391150fddd0.tar.gz gnunet-e300436fe55b9d9c359fb99f5fbe9391150fddd0.zip |
Stop gcc from treating unused arguments as error when compiling with -Wextra
Diffstat (limited to 'src/vpn/gnunet-daemon-vpn.c')
-rw-r--r-- | src/vpn/gnunet-daemon-vpn.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index 1be010685..a085f8065 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c | |||
@@ -65,7 +65,7 @@ static struct GNUNET_CONTAINER_MultiHashMap *udp_connections; | |||
65 | *{{{ | 65 | *{{{ |
66 | */ | 66 | */ |
67 | static void | 67 | static void |
68 | cleanup(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tskctx) { | 68 | cleanup(void* cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext* tskctx) { |
69 | GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); | 69 | GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); |
70 | 70 | ||
71 | /* stop the helper */ | 71 | /* stop the helper */ |
@@ -108,7 +108,7 @@ address_mapping_exists(unsigned char addr[]) { | |||
108 | } | 108 | } |
109 | 109 | ||
110 | static void | 110 | static void |
111 | collect_mappings(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tc) { | 111 | collect_mappings(void* cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext* tc) { |
112 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 112 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
113 | return; | 113 | return; |
114 | 114 | ||
@@ -126,6 +126,9 @@ collect_mappings(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tc) { | |||
126 | 126 | ||
127 | void | 127 | void |
128 | send_icmp_response(void* cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { | 128 | send_icmp_response(void* cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { |
129 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | ||
130 | return; | ||
131 | |||
129 | struct ip6_icmp* request = cls; | 132 | struct ip6_icmp* request = cls; |
130 | 133 | ||
131 | struct ip6_icmp* response = alloca(ntohs(request->shdr.size)); | 134 | struct ip6_icmp* response = alloca(ntohs(request->shdr.size)); |
@@ -188,7 +191,7 @@ port_in_ports (uint64_t ports, uint16_t port) | |||
188 | void | 191 | void |
189 | send_pkt_to_peer (void *cls, | 192 | send_pkt_to_peer (void *cls, |
190 | const struct GNUNET_PeerIdentity *peer, | 193 | const struct GNUNET_PeerIdentity *peer, |
191 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 194 | const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) |
192 | { | 195 | { |
193 | /* peer == NULL means that all peers in this request are connected */ | 196 | /* peer == NULL means that all peers in this request are connected */ |
194 | if (peer == NULL) return; | 197 | if (peer == NULL) return; |
@@ -526,11 +529,11 @@ add_additional_port (struct map_entry *me, uint16_t port) | |||
526 | } | 529 | } |
527 | 530 | ||
528 | static int | 531 | static int |
529 | receive_udp_back (void *cls, struct GNUNET_MESH_Tunnel* tunnel, | 532 | receive_udp_back (void *cls __attribute__((unused)), struct GNUNET_MESH_Tunnel* tunnel, |
530 | void **tunnel_ctx, | 533 | void **tunnel_ctx __attribute__((unused)), |
531 | const struct GNUNET_PeerIdentity *sender, | 534 | const struct GNUNET_PeerIdentity *sender __attribute__((unused)), |
532 | const struct GNUNET_MessageHeader *message, | 535 | const struct GNUNET_MessageHeader *message, |
533 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 536 | const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) |
534 | { | 537 | { |
535 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 538 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
536 | struct remote_addr* s = (struct remote_addr*)desc; | 539 | struct remote_addr* s = (struct remote_addr*)desc; |
@@ -609,11 +612,11 @@ receive_udp_back (void *cls, struct GNUNET_MESH_Tunnel* tunnel, | |||
609 | } | 612 | } |
610 | 613 | ||
611 | static int | 614 | static int |
612 | receive_tcp_back (void *cls, struct GNUNET_MESH_Tunnel* tunnel, | 615 | receive_tcp_back (void *cls __attribute__((unused)), struct GNUNET_MESH_Tunnel* tunnel, |
613 | void **tunnel_ctx, | 616 | void **tunnel_ctx __attribute__((unused)), |
614 | const struct GNUNET_PeerIdentity *sender, | 617 | const struct GNUNET_PeerIdentity *sender __attribute__((unused)), |
615 | const struct GNUNET_MessageHeader *message, | 618 | const struct GNUNET_MessageHeader *message, |
616 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 619 | const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) |
617 | { | 620 | { |
618 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 621 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
619 | struct remote_addr* s = (struct remote_addr*)desc; | 622 | struct remote_addr* s = (struct remote_addr*)desc; |
@@ -700,8 +703,8 @@ receive_tcp_back (void *cls, struct GNUNET_MESH_Tunnel* tunnel, | |||
700 | */ | 703 | */ |
701 | static void | 704 | static void |
702 | run (void *cls, | 705 | run (void *cls, |
703 | char *const *args, | 706 | char *const *args __attribute__((unused)), |
704 | const char *cfgfile, | 707 | const char *cfgfilep __attribute__((unused)), |
705 | const struct GNUNET_CONFIGURATION_Handle *cfg_) | 708 | const struct GNUNET_CONFIGURATION_Handle *cfg_) |
706 | { | 709 | { |
707 | static const struct GNUNET_MESH_MessageHandler handlers[] = { | 710 | static const struct GNUNET_MESH_MessageHandler handlers[] = { |