From 4917fb20a07aa3221683c8a2112c514f44594350 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 28 Nov 2011 16:09:47 +0000 Subject: [PATCH] introducing GNUNET_UNUSED macro instead of hard-coding gcc attribute all over the place; also some further documentation fixes --- src/ats/ats_api_performance.c | 2 +- src/ats/gnunet-service-ats.c | 1 + src/ats/gnunet-service-ats_math.c | 2 +- src/ats/gnunet-service-ats_math.h | 2 +- src/include/gnunet_common.h | 5 ++ .../gnunet-service-transport_neighbours.c | 8 +++ .../gnunet-service-transport_neighbours.h | 2 + src/transport/gnunet-transport-wlan-helper.c | 9 ++-- src/transport/gnunet-transport.c | 5 +- .../plugin_transport_sat_constants.h | 4 +- src/util/getopt.c | 2 +- src/vpn/gnunet-daemon-exit.c | 54 +++++++++---------- src/vpn/gnunet-daemon-vpn-dns.c | 6 +-- src/vpn/gnunet-daemon-vpn-helper.c | 6 +-- src/vpn/gnunet-daemon-vpn.c | 20 +++---- src/vpn/gnunet-service-dns.c | 54 +++++++++---------- 16 files changed, 101 insertions(+), 81 deletions(-) diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index f85d800e4..9739ac1e5 100644 --- a/src/ats/ats_api_performance.c +++ b/src/ats/ats_api_performance.c @@ -167,7 +167,7 @@ struct GNUNET_ATS_PerformanceHandle /** * Re-establish the connection to the ATS service. * - * @param sh handle to use to re-connect. + * @param ph handle to use to re-connect. */ static void reconnect (struct GNUNET_ATS_PerformanceHandle *ph); diff --git a/src/ats/gnunet-service-ats.c b/src/ats/gnunet-service-ats.c index 355a44c43..ff623594a 100644 --- a/src/ats/gnunet-service-ats.c +++ b/src/ats/gnunet-service-ats.c @@ -43,6 +43,7 @@ struct GNUNET_STATISTICS_Handle *GSA_stats; * We have received a 'ClientStartMessage' from a client. Find out which * type of client it is and notify the respective subsystem. * + * @param cls closure, unused * @param client handle to the client * @param message the start message */ diff --git a/src/ats/gnunet-service-ats_math.c b/src/ats/gnunet-service-ats_math.c index c5e68b153..c38c67789 100644 --- a/src/ats/gnunet-service-ats_math.c +++ b/src/ats/gnunet-service-ats_math.c @@ -19,7 +19,7 @@ */ /** - * @file transport/gnunet-service-transport_math.c + * @file ats/gnunet-service-transport_math.c * @brief automatic transport selection, LP code * @author Matthias Wachs * diff --git a/src/ats/gnunet-service-ats_math.h b/src/ats/gnunet-service-ats_math.h index 9ce9dd2cf..2fdceb2c2 100644 --- a/src/ats/gnunet-service-ats_math.h +++ b/src/ats/gnunet-service-ats_math.h @@ -19,7 +19,7 @@ */ /** - * @file transport/gnunet-service-ats_math.h + * @file ats/gnunet-service-ats_math.h * @brief common internal definitions for transport service's ats code * @author Matthias Wachs */ diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 69a428bb5..d406bcacd 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -77,6 +77,11 @@ */ #define GNUNET_PACKED __attribute__((packed)) +/** + * gcc-ism to document unused arguments + */ +#define GNUNET_UNUSED __attribute__((unused)) + /* ************************ super-general types *********************** */ diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 95efe44a1..6f1aa7431 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -1136,6 +1136,7 @@ static void send_outbound_quota (const struct GNUNET_PeerIdentity *target, struc * ATS to not use this address anymore (until it is re-validated). * * @param cls the 'struct GNUNET_HELLO_Address' of the address that was tried + * @param target peer to send the message to * @param success GNUNET_OK on success */ static void @@ -1190,11 +1191,13 @@ send_connect_continuation (void *cls, const struct GNUNET_PeerIdentity *target, GNUNET_free (cc); } + /** * We tried to switch addresses with an peer already connected. If it failed, * we should tell ATS to not use this address anymore (until it is re-validated). * * @param cls the 'struct NeighbourMapEntry' + * @param target peer to send the message to * @param success GNUNET_OK on success */ static void @@ -1291,12 +1294,14 @@ send_switch_address_continuation (void *cls, GNUNET_free (cc); } + /** * We tried to send a SESSION_CONNECT message to another peer. If this * succeeded, we change the state. If it failed, we should tell * ATS to not use this address anymore (until it is re-validated). * * @param cls the 'struct NeighbourMapEntry' + * @param target peer to send the message to * @param success GNUNET_OK on success */ static void @@ -1351,6 +1356,7 @@ send_connect_ack_continuation (void *cls, GNUNET_free (cc); } + /** * For an existing neighbour record, set the active connection to * the given address. @@ -1971,6 +1977,8 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour) * to this peer * * @param neighbour neighbour to keep alive + * @param ats performance data + * @param ats_count number of entries in ats */ void GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour, diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index 7a79d5113..31777343d 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h @@ -129,6 +129,8 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour); * to this peer * * @param neighbour neighbour to keep alive + * @param ats performance data + * @param ats_count number of entries in ats */ void GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour, diff --git a/src/transport/gnunet-transport-wlan-helper.c b/src/transport/gnunet-transport-wlan-helper.c index 7be72482b..53e0efedd 100644 --- a/src/transport/gnunet-transport-wlan-helper.c +++ b/src/transport/gnunet-transport-wlan-helper.c @@ -543,16 +543,17 @@ ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator /** - * ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg - * @iterator: radiotap_iterator to move to next arg (if any) - * - * Returns: next present arg index on success or negative if no more or error + * @brief ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg * * This function returns the next radiotap arg index (IEEE80211_RADIOTAP_...) * and sets iterator->this_arg to point to the payload for the arg. It takes * care of alignment handling and extended present fields. interator->this_arg * can be changed by the caller. The args pointed to are in little-endian * format. + * + * @param iterator: radiotap_iterator to move to next arg (if any) + * + * @return next present arg index on success or negative if no more or error */ static int ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index 4d2912c34..4c9e8566c 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c @@ -437,7 +437,10 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, * Function to call with a human-readable format of an address * * @param cls closure - * @param address NULL on error, otherwise 0-terminated printable UTF-8 string + * @param peer identity of the peer + * @param transport name of the plugin + * @param addr binary address + * @param addrlen number of bytes in addr */ static void process_address (void *cls, const struct GNUNET_PeerIdentity *peer, diff --git a/src/transport/plugin_transport_sat_constants.h b/src/transport/plugin_transport_sat_constants.h index bd64c5d2b..b8202817f 100644 --- a/src/transport/plugin_transport_sat_constants.h +++ b/src/transport/plugin_transport_sat_constants.h @@ -1,6 +1,6 @@ /* This file is part of GNUnet - (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Christian Grothoff (and other contributing authors) + (C) 2011 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -19,7 +19,7 @@ */ /** - * @file transport/plugin_transport_sat_send.h + * @file transport/plugin_transport_sat_constants.h * @brief header for transport plugin for satellite for send operations * @author Christian Rupp */ diff --git a/src/util/getopt.c b/src/util/getopt.c index 317bc0748..6c63cb339 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c @@ -258,7 +258,7 @@ extern pid_t __libc_pid; is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void - __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) + GNUNET_UNUSED store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so * that we can compare them later. But we must not use malloc(3). */ diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c index 838893882..e7d904120 100644 --- a/src/vpn/gnunet-daemon-exit.c +++ b/src/vpn/gnunet-daemon-exit.c @@ -170,8 +170,8 @@ struct tunnel_state * Function that frees everything from a hashmap */ static int -free_iterate (void *cls __attribute__ ((unused)), const GNUNET_HashCode * hash - __attribute__ ((unused)), void *value) +free_iterate (void *cls GNUNET_UNUSED, const GNUNET_HashCode * hash + GNUNET_UNUSED, void *value) { GNUNET_free (value); return GNUNET_YES; @@ -182,7 +182,7 @@ free_iterate (void *cls __attribute__ ((unused)), const GNUNET_HashCode * hash */ static void cleanup (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tskctx) { GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); @@ -200,10 +200,10 @@ cleanup (void *cls static void * new_tunnel (void *cls - __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel, + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, const struct GNUNET_PeerIdentity *initiator - __attribute__ ((unused)), const struct GNUNET_ATS_Information *ats - __attribute__ ((unused))) + GNUNET_UNUSED, const struct GNUNET_ATS_Information *ats + GNUNET_UNUSED) { struct tunnel_state *s = GNUNET_malloc (sizeof *s); @@ -215,7 +215,7 @@ new_tunnel (void *cls static void clean_tunnel (void *cls - __attribute__ ((unused)), const struct GNUNET_MESH_Tunnel *tunnel, + GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel, void *tunnel_ctx) { GNUNET_free (tunnel_ctx); @@ -531,8 +531,8 @@ tcp_from_helper (struct tcp_pkt *tcp, unsigned char *dadr, size_t addrlen, * Receive packets from the helper-process */ static void -message_token (void *cls __attribute__ ((unused)), void *client - __attribute__ ((unused)), +message_token (void *cls GNUNET_UNUSED, void *client + GNUNET_UNUSED, const struct GNUNET_MessageHeader *message) { GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); @@ -584,7 +584,7 @@ message_token (void *cls __attribute__ ((unused)), void *client * @param section name of section in config, equal to hostname */ static void -read_service_conf (void *cls __attribute__ ((unused)), const char *section) +read_service_conf (void *cls GNUNET_UNUSED, const char *section) { if ((strlen (section) < 8) || (0 != strcmp (".gnunet.", section + (strlen (section) - 8)))) @@ -1039,14 +1039,14 @@ prepare_ipv6_packet (size_t len, uint16_t pktlen, void *payload, */ static int receive_tcp_service (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_PeerIdentity *sender - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_MessageHeader *message, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n"); GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); @@ -1145,14 +1145,14 @@ receive_tcp_service (void *cls static int receive_tcp_remote (void *cls - __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel, + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_PeerIdentity *sender - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_MessageHeader *message, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); struct tcp_pkt *pkt = (struct tcp_pkt *) (desc + 1); @@ -1221,14 +1221,14 @@ receive_tcp_remote (void *cls static int receive_udp_remote (void *cls - __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel, + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_PeerIdentity *sender - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_MessageHeader *message, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); @@ -1301,13 +1301,13 @@ receive_udp_remote (void *cls */ static int receive_udp_service (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_MessageHeader *message, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1); @@ -1463,8 +1463,8 @@ connect_to_mesh () * @param cfg_ configuration */ static void -run (void *cls, char *const *args __attribute__ ((unused)), const char *cfgfile - __attribute__ ((unused)), const struct GNUNET_CONFIGURATION_Handle *cfg_) +run (void *cls, char *const *args GNUNET_UNUSED, const char *cfgfile + GNUNET_UNUSED, const struct GNUNET_CONFIGURATION_Handle *cfg_) { cfg = cfg_; diff --git a/src/vpn/gnunet-daemon-vpn-dns.c b/src/vpn/gnunet-daemon-vpn-dns.c index 77d900046..0e4c88a29 100644 --- a/src/vpn/gnunet-daemon-vpn-dns.c +++ b/src/vpn/gnunet-daemon-vpn-dns.c @@ -54,7 +54,7 @@ struct GNUNET_CLIENT_TransmitHandle *dns_transmit_handle; * {{{ */ size_t -send_query (void *cls __attribute__ ((unused)), size_t size, void *buf) +send_query (void *cls GNUNET_UNUSED, size_t size, void *buf) { size_t len; @@ -128,7 +128,7 @@ send_query (void *cls __attribute__ ((unused)), size_t size, void *buf) */ void connect_to_service_dns (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc) { conn_task = GNUNET_SCHEDULER_NO_TASK; @@ -170,7 +170,7 @@ connect_to_service_dns (void *cls */ void dns_answer_handler (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_MessageHeader *msg) { /* the service disconnected, reconnect after short wait */ diff --git a/src/vpn/gnunet-daemon-vpn-helper.c b/src/vpn/gnunet-daemon-vpn-helper.c index af80764a8..1ffb0f7d8 100644 --- a/src/vpn/gnunet-daemon-vpn-helper.c +++ b/src/vpn/gnunet-daemon-vpn-helper.c @@ -169,7 +169,7 @@ initialize_tunnel_state (int addrlen, struct GNUNET_MESH_TransmitHandle *th) */ void helper_write (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tsdkctx) { if (tsdkctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) @@ -321,8 +321,8 @@ helper_write (void *cls * Receive packets from the helper-process */ void -message_token (void *cls __attribute__ ((unused)), void *client - __attribute__ ((unused)), +message_token (void *cls GNUNET_UNUSED, void *client + GNUNET_UNUSED, const struct GNUNET_MessageHeader *message) { GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER); diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index cc8001eae..93ee47e4e 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c @@ -79,7 +79,7 @@ GNUNET_SCHEDULER_TaskIdentifier shs_task; */ static void cleanup (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tskctx) { GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)); @@ -169,7 +169,7 @@ address4_mapping_exists (uint32_t addr) static void collect_mappings (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc) { if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) @@ -336,7 +336,7 @@ port_in_ports (uint64_t ports, uint16_t port) void send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { /* peer == NULL means that all peers in this request are connected */ if (peer == NULL) @@ -857,11 +857,11 @@ add_additional_port (struct map_entry *me, uint16_t port) static int receive_udp_back (void *cls - __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel, + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *message, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); struct remote_addr *s = (struct remote_addr *) desc; @@ -1034,12 +1034,12 @@ receive_udp_back (void *cls static int receive_tcp_back (void *cls - __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel, + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_MessageHeader *message, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1); struct remote_addr *s = (struct remote_addr *) desc; @@ -1245,8 +1245,8 @@ cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, void *tunnel_ctx) * @param cfg_ configuration */ static void -run (void *cls, char *const *args __attribute__ ((unused)), const char *cfgfilep - __attribute__ ((unused)), const struct GNUNET_CONFIGURATION_Handle *cfg_) +run (void *cls, char *const *args GNUNET_UNUSED, const char *cfgfilep + GNUNET_UNUSED, const struct GNUNET_CONFIGURATION_Handle *cfg_) { static const struct GNUNET_MESH_MessageHandler handlers[] = { {receive_udp_back, GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK, 0}, 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) */ static void hijack (void *cls - __attribute__ ((unused)), const struct GNUNET_SCHEDULER_TaskContext *tc) + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc) { if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) return; @@ -208,10 +208,10 @@ hijack (void *cls static void * new_tunnel (void *cls - __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel, + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, const struct GNUNET_PeerIdentity *initiator - __attribute__ ((unused)), const struct GNUNET_ATS_Information *ats - __attribute__ ((unused))) + GNUNET_UNUSED, const struct GNUNET_ATS_Information *ats + GNUNET_UNUSED) { struct tunnel_state *s = GNUNET_malloc (sizeof *s); @@ -223,7 +223,7 @@ new_tunnel (void *cls static void clean_tunnel (void *cls - __attribute__ ((unused)), const struct GNUNET_MESH_Tunnel *tunnel, + GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel, void *tunnel_ctx) { GNUNET_free (tunnel_ctx); @@ -387,7 +387,7 @@ mesh_send (void *cls, size_t size, void *buf) void mesh_connect (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { if (NULL == peer) return; @@ -448,14 +448,14 @@ send_mesh_query (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) static int receive_mesh_query (void *cls - __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel, + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, void **ctx - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_PeerIdentity *sender - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_MessageHeader *message, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { struct dns_pkt *dns = (struct dns_pkt *) (message + 1); @@ -501,13 +501,13 @@ receive_mesh_query (void *cls static int receive_mesh_answer (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel, void **ctx - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *message, const struct GNUNET_ATS_Information *atsi - __attribute__ ((unused))) + GNUNET_UNUSED) { /* TODo: size check */ struct dns_pkt *dns = (struct dns_pkt *) (message + 1); @@ -750,14 +750,14 @@ send_rev_query (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) */ static void receive_dht (void *cls, struct GNUNET_TIME_Absolute exp - __attribute__ ((unused)), const GNUNET_HashCode * key - __attribute__ ((unused)), + GNUNET_UNUSED, const GNUNET_HashCode * key + GNUNET_UNUSED, const struct GNUNET_PeerIdentity *get_path - __attribute__ ((unused)), unsigned int get_path_length - __attribute__ ((unused)), + GNUNET_UNUSED, unsigned int get_path_length + GNUNET_UNUSED, const struct GNUNET_PeerIdentity *put_path - __attribute__ ((unused)), unsigned int put_path_length - __attribute__ ((unused)), enum GNUNET_BLOCK_Type type, size_t size, + GNUNET_UNUSED, unsigned int put_path_length + GNUNET_UNUSED, enum GNUNET_BLOCK_Type type, size_t size, const void *data) { @@ -869,8 +869,8 @@ receive_dht (void *cls, struct GNUNET_TIME_Absolute exp */ static void rehijack (void *cls - __attribute__ ((unused)), struct GNUNET_SERVER_Client *client, - const struct GNUNET_MessageHeader *message __attribute__ ((unused))) + GNUNET_UNUSED, struct GNUNET_SERVER_Client *client, + const struct GNUNET_MessageHeader *message GNUNET_UNUSED) { unhijack (dnsoutport); GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &hijack, NULL); @@ -883,7 +883,7 @@ rehijack (void *cls */ static void receive_query (void *cls - __attribute__ ((unused)), struct GNUNET_SERVER_Client *client, + GNUNET_UNUSED, struct GNUNET_SERVER_Client *client, const struct GNUNET_MessageHeader *message) { struct query_packet *pkt = (struct query_packet *) message; @@ -1232,7 +1232,7 @@ handle_response (struct dns_pkt *dns, struct sockaddr *addr, socklen_t addrlen, */ static void read_response6 (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct sockaddr_in6 addr; @@ -1282,7 +1282,7 @@ read_response6 (void *cls */ static void read_response (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct sockaddr_in addr; @@ -1439,7 +1439,7 @@ handle_response (struct dns_pkt *dns, struct sockaddr *addr, socklen_t addrlen, */ static void cleanup_task (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc) { 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, * @param section the current section */ static void -publish_iterate (void *cls __attribute__ ((unused)), const char *section) +publish_iterate (void *cls GNUNET_UNUSED, const char *section) { char *udp_redirects; char *tcp_redirects; @@ -1666,7 +1666,7 @@ publish_iterate (void *cls __attribute__ ((unused)), const char *section) */ static void publish_names (void *cls - __attribute__ ((unused)), + GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc) { if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) -- 2.25.1