diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-28 16:09:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-28 16:09:47 +0000 |
commit | 4917fb20a07aa3221683c8a2112c514f44594350 (patch) | |
tree | 3584e6988f6bcddd19ea9d77c040e02d659a79c9 /src/vpn/gnunet-service-dns.c | |
parent | 636b3202c2ea8ebc6dd51a90c839a2e495ea0d27 (diff) | |
download | gnunet-4917fb20a07aa3221683c8a2112c514f44594350.tar.gz gnunet-4917fb20a07aa3221683c8a2112c514f44594350.zip |
introducing GNUNET_UNUSED macro instead of hard-coding gcc attribute all over the place; also some further documentation fixes
Diffstat (limited to 'src/vpn/gnunet-service-dns.c')
-rw-r--r-- | src/vpn/gnunet-service-dns.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index c8d790b56..e44405a8e 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c | |||
@@ -168,7 +168,7 @@ client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) | |||
168 | */ | 168 | */ |
169 | static void | 169 | static void |
170 | hijack (void *cls | 170 | hijack (void *cls |
171 | __attribute__ ((unused)), const struct GNUNET_SCHEDULER_TaskContext *tc) | 171 | GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc) |
172 | { | 172 | { |
173 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 173 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
174 | return; | 174 | return; |
@@ -208,10 +208,10 @@ hijack (void *cls | |||
208 | 208 | ||
209 | static void * | 209 | static void * |
210 | new_tunnel (void *cls | 210 | new_tunnel (void *cls |
211 | __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel, | 211 | GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, |
212 | const struct GNUNET_PeerIdentity *initiator | 212 | const struct GNUNET_PeerIdentity *initiator |
213 | __attribute__ ((unused)), const struct GNUNET_ATS_Information *ats | 213 | GNUNET_UNUSED, const struct GNUNET_ATS_Information *ats |
214 | __attribute__ ((unused))) | 214 | GNUNET_UNUSED) |
215 | { | 215 | { |
216 | struct tunnel_state *s = GNUNET_malloc (sizeof *s); | 216 | struct tunnel_state *s = GNUNET_malloc (sizeof *s); |
217 | 217 | ||
@@ -223,7 +223,7 @@ new_tunnel (void *cls | |||
223 | 223 | ||
224 | static void | 224 | static void |
225 | clean_tunnel (void *cls | 225 | clean_tunnel (void *cls |
226 | __attribute__ ((unused)), const struct GNUNET_MESH_Tunnel *tunnel, | 226 | GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel, |
227 | void *tunnel_ctx) | 227 | void *tunnel_ctx) |
228 | { | 228 | { |
229 | GNUNET_free (tunnel_ctx); | 229 | GNUNET_free (tunnel_ctx); |
@@ -387,7 +387,7 @@ mesh_send (void *cls, size_t size, void *buf) | |||
387 | void | 387 | void |
388 | mesh_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | 388 | mesh_connect (void *cls, const struct GNUNET_PeerIdentity *peer, |
389 | const struct GNUNET_ATS_Information *atsi | 389 | const struct GNUNET_ATS_Information *atsi |
390 | __attribute__ ((unused))) | 390 | GNUNET_UNUSED) |
391 | { | 391 | { |
392 | if (NULL == peer) | 392 | if (NULL == peer) |
393 | return; | 393 | return; |
@@ -448,14 +448,14 @@ send_mesh_query (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
448 | 448 | ||
449 | static int | 449 | static int |
450 | receive_mesh_query (void *cls | 450 | receive_mesh_query (void *cls |
451 | __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel, | 451 | GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, |
452 | void **ctx | 452 | void **ctx |
453 | __attribute__ ((unused)), | 453 | GNUNET_UNUSED, |
454 | const struct GNUNET_PeerIdentity *sender | 454 | const struct GNUNET_PeerIdentity *sender |
455 | __attribute__ ((unused)), | 455 | GNUNET_UNUSED, |
456 | const struct GNUNET_MessageHeader *message, | 456 | const struct GNUNET_MessageHeader *message, |
457 | const struct GNUNET_ATS_Information *atsi | 457 | const struct GNUNET_ATS_Information *atsi |
458 | __attribute__ ((unused))) | 458 | GNUNET_UNUSED) |
459 | { | 459 | { |
460 | struct dns_pkt *dns = (struct dns_pkt *) (message + 1); | 460 | struct dns_pkt *dns = (struct dns_pkt *) (message + 1); |
461 | 461 | ||
@@ -501,13 +501,13 @@ receive_mesh_query (void *cls | |||
501 | 501 | ||
502 | static int | 502 | static int |
503 | receive_mesh_answer (void *cls | 503 | receive_mesh_answer (void *cls |
504 | __attribute__ ((unused)), | 504 | GNUNET_UNUSED, |
505 | struct GNUNET_MESH_Tunnel *tunnel, void **ctx | 505 | struct GNUNET_MESH_Tunnel *tunnel, void **ctx |
506 | __attribute__ ((unused)), | 506 | GNUNET_UNUSED, |
507 | const struct GNUNET_PeerIdentity *sender, | 507 | const struct GNUNET_PeerIdentity *sender, |
508 | const struct GNUNET_MessageHeader *message, | 508 | const struct GNUNET_MessageHeader *message, |
509 | const struct GNUNET_ATS_Information *atsi | 509 | const struct GNUNET_ATS_Information *atsi |
510 | __attribute__ ((unused))) | 510 | GNUNET_UNUSED) |
511 | { | 511 | { |
512 | /* TODo: size check */ | 512 | /* TODo: size check */ |
513 | struct dns_pkt *dns = (struct dns_pkt *) (message + 1); | 513 | struct dns_pkt *dns = (struct dns_pkt *) (message + 1); |
@@ -750,14 +750,14 @@ send_rev_query (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
750 | */ | 750 | */ |
751 | static void | 751 | static void |
752 | receive_dht (void *cls, struct GNUNET_TIME_Absolute exp | 752 | receive_dht (void *cls, struct GNUNET_TIME_Absolute exp |
753 | __attribute__ ((unused)), const GNUNET_HashCode * key | 753 | GNUNET_UNUSED, const GNUNET_HashCode * key |
754 | __attribute__ ((unused)), | 754 | GNUNET_UNUSED, |
755 | const struct GNUNET_PeerIdentity *get_path | 755 | const struct GNUNET_PeerIdentity *get_path |
756 | __attribute__ ((unused)), unsigned int get_path_length | 756 | GNUNET_UNUSED, unsigned int get_path_length |
757 | __attribute__ ((unused)), | 757 | GNUNET_UNUSED, |
758 | const struct GNUNET_PeerIdentity *put_path | 758 | const struct GNUNET_PeerIdentity *put_path |
759 | __attribute__ ((unused)), unsigned int put_path_length | 759 | GNUNET_UNUSED, unsigned int put_path_length |
760 | __attribute__ ((unused)), enum GNUNET_BLOCK_Type type, size_t size, | 760 | GNUNET_UNUSED, enum GNUNET_BLOCK_Type type, size_t size, |
761 | const void *data) | 761 | const void *data) |
762 | { | 762 | { |
763 | 763 | ||
@@ -869,8 +869,8 @@ receive_dht (void *cls, struct GNUNET_TIME_Absolute exp | |||
869 | */ | 869 | */ |
870 | static void | 870 | static void |
871 | rehijack (void *cls | 871 | rehijack (void *cls |
872 | __attribute__ ((unused)), struct GNUNET_SERVER_Client *client, | 872 | GNUNET_UNUSED, struct GNUNET_SERVER_Client *client, |
873 | const struct GNUNET_MessageHeader *message __attribute__ ((unused))) | 873 | const struct GNUNET_MessageHeader *message GNUNET_UNUSED) |
874 | { | 874 | { |
875 | unhijack (dnsoutport); | 875 | unhijack (dnsoutport); |
876 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &hijack, NULL); | 876 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &hijack, NULL); |
@@ -883,7 +883,7 @@ rehijack (void *cls | |||
883 | */ | 883 | */ |
884 | static void | 884 | static void |
885 | receive_query (void *cls | 885 | receive_query (void *cls |
886 | __attribute__ ((unused)), struct GNUNET_SERVER_Client *client, | 886 | GNUNET_UNUSED, struct GNUNET_SERVER_Client *client, |
887 | const struct GNUNET_MessageHeader *message) | 887 | const struct GNUNET_MessageHeader *message) |
888 | { | 888 | { |
889 | struct query_packet *pkt = (struct query_packet *) message; | 889 | struct query_packet *pkt = (struct query_packet *) message; |
@@ -1232,7 +1232,7 @@ handle_response (struct dns_pkt *dns, struct sockaddr *addr, socklen_t addrlen, | |||
1232 | */ | 1232 | */ |
1233 | static void | 1233 | static void |
1234 | read_response6 (void *cls | 1234 | read_response6 (void *cls |
1235 | __attribute__ ((unused)), | 1235 | GNUNET_UNUSED, |
1236 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 1236 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
1237 | { | 1237 | { |
1238 | struct sockaddr_in6 addr; | 1238 | struct sockaddr_in6 addr; |
@@ -1282,7 +1282,7 @@ read_response6 (void *cls | |||
1282 | */ | 1282 | */ |
1283 | static void | 1283 | static void |
1284 | read_response (void *cls | 1284 | read_response (void *cls |
1285 | __attribute__ ((unused)), | 1285 | GNUNET_UNUSED, |
1286 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 1286 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
1287 | { | 1287 | { |
1288 | struct sockaddr_in addr; | 1288 | struct sockaddr_in addr; |
@@ -1439,7 +1439,7 @@ handle_response (struct dns_pkt *dns, struct sockaddr *addr, socklen_t addrlen, | |||
1439 | */ | 1439 | */ |
1440 | static void | 1440 | static void |
1441 | cleanup_task (void *cls | 1441 | cleanup_task (void *cls |
1442 | __attribute__ ((unused)), | 1442 | GNUNET_UNUSED, |
1443 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 1443 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
1444 | { | 1444 | { |
1445 | GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); | 1445 | GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); |
@@ -1590,7 +1590,7 @@ publish_name (const char *name, uint64_t ports, uint32_t service_type, | |||
1590 | * @param section the current section | 1590 | * @param section the current section |
1591 | */ | 1591 | */ |
1592 | static void | 1592 | static void |
1593 | publish_iterate (void *cls __attribute__ ((unused)), const char *section) | 1593 | publish_iterate (void *cls GNUNET_UNUSED, const char *section) |
1594 | { | 1594 | { |
1595 | char *udp_redirects; | 1595 | char *udp_redirects; |
1596 | char *tcp_redirects; | 1596 | char *tcp_redirects; |
@@ -1666,7 +1666,7 @@ publish_iterate (void *cls __attribute__ ((unused)), const char *section) | |||
1666 | */ | 1666 | */ |
1667 | static void | 1667 | static void |
1668 | publish_names (void *cls | 1668 | publish_names (void *cls |
1669 | __attribute__ ((unused)), | 1669 | GNUNET_UNUSED, |
1670 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 1670 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
1671 | { | 1671 | { |
1672 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1672 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |