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 | |
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')
-rw-r--r-- | src/vpn/gnunet-daemon-exit.c | 46 | ||||
-rw-r--r-- | src/vpn/gnunet-daemon-vpn-dns.c | 6 | ||||
-rw-r--r-- | src/vpn/gnunet-daemon-vpn-helper.c | 6 | ||||
-rw-r--r-- | src/vpn/gnunet-daemon-vpn.c | 29 | ||||
-rw-r--r-- | src/vpn/gnunet-service-dns.c | 42 |
5 files changed, 66 insertions, 63 deletions
diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c index 0ee07fead..eaa50d2e1 100644 --- a/src/vpn/gnunet-daemon-exit.c +++ b/src/vpn/gnunet-daemon-exit.c | |||
@@ -157,7 +157,7 @@ static struct GNUNET_CONTAINER_MultiHashMap *tcp_services; | |||
157 | * Function that frees everything from a hashmap | 157 | * Function that frees everything from a hashmap |
158 | */ | 158 | */ |
159 | static int | 159 | static int |
160 | free_iterate(void* cls, const GNUNET_HashCode* hash, void* value) | 160 | free_iterate(void* cls __attribute__((unused)), const GNUNET_HashCode* hash __attribute__((unused)), void* value) |
161 | { | 161 | { |
162 | GNUNET_free(value); | 162 | GNUNET_free(value); |
163 | return GNUNET_YES; | 163 | return GNUNET_YES; |
@@ -167,7 +167,7 @@ free_iterate(void* cls, const GNUNET_HashCode* hash, void* value) | |||
167 | * Function scheduled as very last function, cleans up after us | 167 | * Function scheduled as very last function, cleans up after us |
168 | */ | 168 | */ |
169 | static void | 169 | static void |
170 | cleanup(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tskctx) { | 170 | cleanup(void* cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext* tskctx) { |
171 | GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); | 171 | GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); |
172 | 172 | ||
173 | GNUNET_CONTAINER_multihashmap_iterate(udp_connections, | 173 | GNUNET_CONTAINER_multihashmap_iterate(udp_connections, |
@@ -407,8 +407,8 @@ tcp_from_helper (struct tcp_pkt *tcp, unsigned char *dadr, size_t addrlen, | |||
407 | * Receive packets from the helper-process | 407 | * Receive packets from the helper-process |
408 | */ | 408 | */ |
409 | static void | 409 | static void |
410 | message_token (void *cls, | 410 | message_token (void *cls __attribute__((unused)), |
411 | void *client, const struct GNUNET_MessageHeader *message) | 411 | void *client __attribute__((unused)), const struct GNUNET_MessageHeader *message) |
412 | { | 412 | { |
413 | GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); | 413 | GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); |
414 | 414 | ||
@@ -459,7 +459,7 @@ message_token (void *cls, | |||
459 | * "OFFERED-PORT:HOSTNAME:HOST-PORT" (SPACE <more of those>)* | 459 | * "OFFERED-PORT:HOSTNAME:HOST-PORT" (SPACE <more of those>)* |
460 | */ | 460 | */ |
461 | static void | 461 | static void |
462 | read_service_conf (void *cls, const char *section, const char *option, | 462 | read_service_conf (void *cls __attribute__((unused)), const char *section, const char *option, |
463 | const char *value) | 463 | const char *value) |
464 | { | 464 | { |
465 | char *cpy; | 465 | char *cpy; |
@@ -831,12 +831,12 @@ prepare_ipv6_packet (ssize_t len, ssize_t pktlen, void *payload, | |||
831 | * The messages are one GNUNET_HashCode for the service followed by a struct tcp_pkt | 831 | * The messages are one GNUNET_HashCode for the service followed by a struct tcp_pkt |
832 | */ | 832 | */ |
833 | static int | 833 | static int |
834 | receive_tcp_service (void *cls, | 834 | receive_tcp_service (void *cls __attribute__((unused)), |
835 | struct GNUNET_MESH_Tunnel *tunnel, | 835 | struct GNUNET_MESH_Tunnel *tunnel, |
836 | void **tunnel_ctx, | 836 | void **tunnel_ctx __attribute__((unused)), |
837 | const struct GNUNET_PeerIdentity *sender, | 837 | const struct GNUNET_PeerIdentity *sender __attribute__((unused)), |
838 | const struct GNUNET_MessageHeader *message, | 838 | const struct GNUNET_MessageHeader *message, |
839 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 839 | const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) |
840 | { | 840 | { |
841 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n"); | 841 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n"); |
842 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 842 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
@@ -932,12 +932,12 @@ receive_tcp_service (void *cls, | |||
932 | } | 932 | } |
933 | 933 | ||
934 | static int | 934 | static int |
935 | receive_tcp_remote (void *cls, | 935 | receive_tcp_remote (void *cls __attribute__((unused)), |
936 | struct GNUNET_MESH_Tunnel *tunnel, | 936 | struct GNUNET_MESH_Tunnel *tunnel, |
937 | void **tunnel_ctx, | 937 | void **tunnel_ctx __attribute__((unused)), |
938 | const struct GNUNET_PeerIdentity *sender, | 938 | const struct GNUNET_PeerIdentity *sender __attribute__((unused)), |
939 | const struct GNUNET_MessageHeader *message, | 939 | const struct GNUNET_MessageHeader *message, |
940 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 940 | const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) |
941 | { | 941 | { |
942 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 942 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
943 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); | 943 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); |
@@ -1000,12 +1000,12 @@ receive_tcp_remote (void *cls, | |||
1000 | } | 1000 | } |
1001 | 1001 | ||
1002 | static int | 1002 | static int |
1003 | receive_udp_remote (void *cls, | 1003 | receive_udp_remote (void *cls __attribute__((unused)), |
1004 | struct GNUNET_MESH_Tunnel *tunnel, | 1004 | struct GNUNET_MESH_Tunnel *tunnel, |
1005 | void **tunnel_ctx, | 1005 | void **tunnel_ctx __attribute__((unused)), |
1006 | const struct GNUNET_PeerIdentity *sender, | 1006 | const struct GNUNET_PeerIdentity *sender __attribute__((unused)), |
1007 | const struct GNUNET_MessageHeader *message, | 1007 | const struct GNUNET_MessageHeader *message, |
1008 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1008 | const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) |
1009 | { | 1009 | { |
1010 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1010 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
1011 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); | 1011 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); |
@@ -1078,12 +1078,12 @@ receive_udp_remote (void *cls, | |||
1078 | * The messages are one GNUNET_HashCode for the service, followed by a struct udp_pkt | 1078 | * The messages are one GNUNET_HashCode for the service, followed by a struct udp_pkt |
1079 | */ | 1079 | */ |
1080 | static int | 1080 | static int |
1081 | receive_udp_service (void *cls, | 1081 | receive_udp_service (void *cls __attribute__((unused)), |
1082 | struct GNUNET_MESH_Tunnel *tunnel, | 1082 | struct GNUNET_MESH_Tunnel *tunnel, |
1083 | void **tunnel_ctx, | 1083 | void **tunnel_ctx __attribute__((unused)), |
1084 | const struct GNUNET_PeerIdentity *sender, | 1084 | const struct GNUNET_PeerIdentity *sender __attribute__((unused)), |
1085 | const struct GNUNET_MessageHeader *message, | 1085 | const struct GNUNET_MessageHeader *message, |
1086 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 1086 | const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) |
1087 | { | 1087 | { |
1088 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); | 1088 | GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); |
1089 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); | 1089 | struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); |
@@ -1184,8 +1184,8 @@ receive_udp_service (void *cls, | |||
1184 | */ | 1184 | */ |
1185 | static void | 1185 | static void |
1186 | run (void *cls, | 1186 | run (void *cls, |
1187 | char *const *args, | 1187 | char *const *args __attribute__((unused)), |
1188 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg_) | 1188 | const char *cfgfile __attribute__((unused)), const struct GNUNET_CONFIGURATION_Handle *cfg_) |
1189 | { | 1189 | { |
1190 | static const struct GNUNET_MESH_MessageHandler handlers[] = { | 1190 | static const struct GNUNET_MESH_MessageHandler handlers[] = { |
1191 | {receive_udp_service, GNUNET_MESSAGE_TYPE_SERVICE_UDP, 0}, | 1191 | {receive_udp_service, GNUNET_MESSAGE_TYPE_SERVICE_UDP, 0}, |
diff --git a/src/vpn/gnunet-daemon-vpn-dns.c b/src/vpn/gnunet-daemon-vpn-dns.c index 07e2d6059..46ec6d659 100644 --- a/src/vpn/gnunet-daemon-vpn-dns.c +++ b/src/vpn/gnunet-daemon-vpn-dns.c | |||
@@ -52,7 +52,7 @@ struct answer_packet_list *answer_proc_tail; | |||
52 | * {{{ | 52 | * {{{ |
53 | */ | 53 | */ |
54 | size_t | 54 | size_t |
55 | send_query(void* cls, size_t size, void* buf) { | 55 | send_query(void* cls __attribute__((unused)), size_t size, void* buf) { |
56 | size_t len; | 56 | size_t len; |
57 | /* | 57 | /* |
58 | * Send the rehijack-message | 58 | * Send the rehijack-message |
@@ -109,7 +109,7 @@ send_query(void* cls, size_t size, void* buf) { | |||
109 | * Connect to the service-dns | 109 | * Connect to the service-dns |
110 | */ | 110 | */ |
111 | void | 111 | void |
112 | connect_to_service_dns (void *cls, | 112 | connect_to_service_dns (void *cls __attribute__((unused)), |
113 | const struct GNUNET_SCHEDULER_TaskContext *tc) { | 113 | const struct GNUNET_SCHEDULER_TaskContext *tc) { |
114 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 114 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
115 | return; | 115 | return; |
@@ -142,7 +142,7 @@ connect_to_service_dns (void *cls, | |||
142 | * handle it | 142 | * handle it |
143 | */ | 143 | */ |
144 | void | 144 | void |
145 | dns_answer_handler(void* cls, const struct GNUNET_MessageHeader *msg) { | 145 | dns_answer_handler(void* cls __attribute__((unused)), const struct GNUNET_MessageHeader *msg) { |
146 | /* the service disconnected, reconnect after short wait */ | 146 | /* the service disconnected, reconnect after short wait */ |
147 | if (msg == NULL) | 147 | if (msg == NULL) |
148 | { | 148 | { |
diff --git a/src/vpn/gnunet-daemon-vpn-helper.c b/src/vpn/gnunet-daemon-vpn-helper.c index 100f08c97..b2119ecbb 100644 --- a/src/vpn/gnunet-daemon-vpn-helper.c +++ b/src/vpn/gnunet-daemon-vpn-helper.c | |||
@@ -132,7 +132,7 @@ start_helper_and_schedule(void *cls, | |||
132 | * Send an dns-answer-packet to the helper | 132 | * Send an dns-answer-packet to the helper |
133 | */ | 133 | */ |
134 | void | 134 | void |
135 | helper_write(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tsdkctx) { | 135 | helper_write(void* cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext* tsdkctx) { |
136 | if (tsdkctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) | 136 | if (tsdkctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) |
137 | return; | 137 | return; |
138 | 138 | ||
@@ -205,8 +205,8 @@ helper_write(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tsdkctx) { | |||
205 | * Receive packets from the helper-process | 205 | * Receive packets from the helper-process |
206 | */ | 206 | */ |
207 | void | 207 | void |
208 | message_token (void *cls, | 208 | message_token (void *cls __attribute__((unused)), |
209 | void *client, const struct GNUNET_MessageHeader *message) | 209 | void *client __attribute__((unused)), const struct GNUNET_MessageHeader *message) |
210 | { | 210 | { |
211 | GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); | 211 | GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); |
212 | 212 | ||
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[] = { |
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index 7b96a180d..b8edcce16 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c | |||
@@ -111,7 +111,7 @@ struct receive_dht_cls { | |||
111 | * Hijack all outgoing DNS-Traffic but for traffic leaving "our" port. | 111 | * Hijack all outgoing DNS-Traffic but for traffic leaving "our" port. |
112 | */ | 112 | */ |
113 | static void | 113 | static void |
114 | hijack (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 114 | hijack (void *cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext *tc) |
115 | { | 115 | { |
116 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 116 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
117 | return; | 117 | return; |
@@ -242,7 +242,7 @@ mesh_send (void *cls, size_t size, void *buf) | |||
242 | } | 242 | } |
243 | 243 | ||
244 | 244 | ||
245 | void mesh_connect (void* cls, const struct GNUNET_PeerIdentity* peer, const struct GNUNET_TRANSPORT_ATS_Information *atsi) { | 245 | void mesh_connect (void* cls, const struct GNUNET_PeerIdentity* peer, const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) { |
246 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %x\n", *((unsigned long*)peer)); | 246 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %x\n", *((unsigned long*)peer)); |
247 | struct tunnel_cls *cls_ = (struct tunnel_cls*)cls; | 247 | struct tunnel_cls *cls_ = (struct tunnel_cls*)cls; |
248 | 248 | ||
@@ -276,12 +276,12 @@ send_mesh_query (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
276 | } | 276 | } |
277 | 277 | ||
278 | static int | 278 | static int |
279 | receive_mesh_query (void *cls, | 279 | receive_mesh_query (void *cls __attribute__((unused)), |
280 | struct GNUNET_MESH_Tunnel *tunnel, | 280 | struct GNUNET_MESH_Tunnel *tunnel, |
281 | void **ctx, | 281 | void **ctx __attribute__((unused)), |
282 | const struct GNUNET_PeerIdentity *sender, | 282 | const struct GNUNET_PeerIdentity *sender __attribute__((unused)), |
283 | const struct GNUNET_MessageHeader *message, | 283 | const struct GNUNET_MessageHeader *message, |
284 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 284 | const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) |
285 | { | 285 | { |
286 | struct dns_pkt *dns = (struct dns_pkt*)(message + 1); | 286 | struct dns_pkt *dns = (struct dns_pkt*)(message + 1); |
287 | 287 | ||
@@ -304,12 +304,12 @@ receive_mesh_query (void *cls, | |||
304 | } | 304 | } |
305 | 305 | ||
306 | static int | 306 | static int |
307 | receive_mesh_answer (void *cls, | 307 | receive_mesh_answer (void *cls __attribute__((unused)), |
308 | struct GNUNET_MESH_Tunnel *tunnel, | 308 | struct GNUNET_MESH_Tunnel *tunnel, |
309 | void **ctx, | 309 | void **ctx __attribute__((unused)), |
310 | const struct GNUNET_PeerIdentity *sender, | 310 | const struct GNUNET_PeerIdentity *sender __attribute__((unused)), |
311 | const struct GNUNET_MessageHeader *message, | 311 | const struct GNUNET_MessageHeader *message, |
312 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) | 312 | const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) |
313 | { | 313 | { |
314 | /* TODo: size check */ | 314 | /* TODo: size check */ |
315 | struct dns_pkt *dns = (struct dns_pkt *) (message + 1); | 315 | struct dns_pkt *dns = (struct dns_pkt *) (message + 1); |
@@ -485,10 +485,10 @@ send_rev_query(void * cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { | |||
485 | */ | 485 | */ |
486 | static void | 486 | static void |
487 | receive_dht(void *cls, | 487 | receive_dht(void *cls, |
488 | struct GNUNET_TIME_Absolute exp, | 488 | struct GNUNET_TIME_Absolute exp __attribute__((unused)), |
489 | const GNUNET_HashCode *key, | 489 | const GNUNET_HashCode *key __attribute__((unused)), |
490 | const struct GNUNET_PeerIdentity *const *get_path, | 490 | const struct GNUNET_PeerIdentity *const *get_path __attribute__((unused)), |
491 | const struct GNUNET_PeerIdentity *const *put_path, | 491 | const struct GNUNET_PeerIdentity *const *put_path __attribute__((unused)), |
492 | enum GNUNET_BLOCK_Type type, | 492 | enum GNUNET_BLOCK_Type type, |
493 | size_t size, | 493 | size_t size, |
494 | const void *data) { | 494 | const void *data) { |
@@ -592,9 +592,9 @@ receive_dht(void *cls, | |||
592 | * This receives a GNUNET_MESSAGE_TYPE_REHIJACK and rehijacks the DNS | 592 | * This receives a GNUNET_MESSAGE_TYPE_REHIJACK and rehijacks the DNS |
593 | */ | 593 | */ |
594 | static void | 594 | static void |
595 | rehijack(void *cls, | 595 | rehijack(void *cls __attribute__((unused)), |
596 | struct GNUNET_SERVER_Client *client, | 596 | struct GNUNET_SERVER_Client *client, |
597 | const struct GNUNET_MessageHeader *message) { | 597 | const struct GNUNET_MessageHeader *message __attribute__((unused))) { |
598 | unhijack(dnsoutport); | 598 | unhijack(dnsoutport); |
599 | GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, hijack, NULL); | 599 | GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, hijack, NULL); |
600 | 600 | ||
@@ -605,7 +605,7 @@ rehijack(void *cls, | |||
605 | * This receives the dns-payload from the daemon-vpn and sends it on over the udp-socket | 605 | * This receives the dns-payload from the daemon-vpn and sends it on over the udp-socket |
606 | */ | 606 | */ |
607 | static void | 607 | static void |
608 | receive_query(void *cls, | 608 | receive_query(void *cls __attribute__((unused)), |
609 | struct GNUNET_SERVER_Client *client, | 609 | struct GNUNET_SERVER_Client *client, |
610 | const struct GNUNET_MessageHeader *message) { | 610 | const struct GNUNET_MessageHeader *message) { |
611 | struct query_packet* pkt = (struct query_packet*)message; | 611 | struct query_packet* pkt = (struct query_packet*)message; |
@@ -806,7 +806,7 @@ open_port () | |||
806 | * Read a response-packet of the UDP-Socket | 806 | * Read a response-packet of the UDP-Socket |
807 | */ | 807 | */ |
808 | static void | 808 | static void |
809 | read_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 809 | read_response (void *cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext *tc) |
810 | { | 810 | { |
811 | struct sockaddr_in addr; | 811 | struct sockaddr_in addr; |
812 | socklen_t addrlen = sizeof (addr); | 812 | socklen_t addrlen = sizeof (addr); |
@@ -899,7 +899,7 @@ read_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
899 | * @param tc unused | 899 | * @param tc unused |
900 | */ | 900 | */ |
901 | static void | 901 | static void |
902 | cleanup_task (void *cls, | 902 | cleanup_task (void *cls __attribute__((unused)), |
903 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 903 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
904 | { | 904 | { |
905 | GNUNET_assert(0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); | 905 | GNUNET_assert(0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); |
@@ -1041,7 +1041,7 @@ publish_name (const char *name, uint64_t ports, uint32_t service_type, | |||
1041 | * @param section the current section | 1041 | * @param section the current section |
1042 | */ | 1042 | */ |
1043 | void | 1043 | void |
1044 | publish_iterate (void *cls, const char *section) | 1044 | publish_iterate (void *cls __attribute__((unused)), const char *section) |
1045 | { | 1045 | { |
1046 | char *udp_redirects, *tcp_redirects, *alternative_names, *alternative_name, | 1046 | char *udp_redirects, *tcp_redirects, *alternative_names, *alternative_name, |
1047 | *keyfile; | 1047 | *keyfile; |
@@ -1105,7 +1105,7 @@ publish_iterate (void *cls, const char *section) | |||
1105 | * Publish a DNS-record in the DHT. This is up to now just for testing. | 1105 | * Publish a DNS-record in the DHT. This is up to now just for testing. |
1106 | */ | 1106 | */ |
1107 | static void | 1107 | static void |
1108 | publish_names (void *cls, | 1108 | publish_names (void *cls __attribute__((unused)), |
1109 | const struct GNUNET_SCHEDULER_TaskContext *tc) { | 1109 | const struct GNUNET_SCHEDULER_TaskContext *tc) { |
1110 | char *services; | 1110 | char *services; |
1111 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1111 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |