[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15609 - in gnunet/src: mesh vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15609 - in gnunet/src: mesh vpn |
Date: |
Wed, 15 Jun 2011 09:15:40 +0200 |
Author: toelke
Date: 2011-06-15 09:15:40 +0200 (Wed, 15 Jun 2011)
New Revision: 15609
Modified:
gnunet/src/mesh/mesh_api.c
gnunet/src/vpn/gnunet-daemon-exit.c
gnunet/src/vpn/gnunet-daemon-vpn-dns.c
gnunet/src/vpn/gnunet-daemon-vpn-helper.c
gnunet/src/vpn/gnunet-daemon-vpn.c
gnunet/src/vpn/gnunet-service-dns.c
Log:
Stop gcc from treating unused arguments as error when compiling with -Wextra
Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c 2011-06-15 07:15:39 UTC (rev 15608)
+++ gnunet/src/mesh/mesh_api.c 2011-06-15 07:15:40 UTC (rev 15609)
@@ -164,9 +164,9 @@
static void
core_startup (void *cls,
- struct GNUNET_CORE_Handle *core,
+ struct GNUNET_CORE_Handle *core __attribute__((unused)),
const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey
__attribute__((unused)))
{
struct GNUNET_MESH_Handle *handle = cls;
memcpy (&handle->myself, my_identity, sizeof (struct GNUNET_PeerIdentity));
@@ -620,7 +620,7 @@
struct
GNUNET_TIME_Relative
maxdelay,
- const struct GNUNET_PeerIdentity *target,
+ const struct GNUNET_PeerIdentity *target
__attribute__((unused)),
size_t
notify_size,
GNUNET_CONNECTION_TransmitReadyNotify
Modified: gnunet/src/vpn/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-exit.c 2011-06-15 07:15:39 UTC (rev 15608)
+++ gnunet/src/vpn/gnunet-daemon-exit.c 2011-06-15 07:15:40 UTC (rev 15609)
@@ -157,7 +157,7 @@
* Function that frees everything from a hashmap
*/
static int
-free_iterate(void* cls, const GNUNET_HashCode* hash, void* value)
+free_iterate(void* cls __attribute__((unused)), const GNUNET_HashCode* hash
__attribute__((unused)), void* value)
{
GNUNET_free(value);
return GNUNET_YES;
@@ -167,7 +167,7 @@
* Function scheduled as very last function, cleans up after us
*/
static void
-cleanup(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tskctx) {
+cleanup(void* cls __attribute__((unused)), const struct
GNUNET_SCHEDULER_TaskContext* tskctx) {
GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
GNUNET_CONTAINER_multihashmap_iterate(udp_connections,
@@ -407,8 +407,8 @@
* Receive packets from the helper-process
*/
static void
-message_token (void *cls,
- void *client, const struct GNUNET_MessageHeader *message)
+message_token (void *cls __attribute__((unused)),
+ void *client __attribute__((unused)), const struct
GNUNET_MessageHeader *message)
{
GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER);
@@ -459,7 +459,7 @@
* "OFFERED-PORT:HOSTNAME:HOST-PORT" (SPACE <more of those>)*
*/
static void
-read_service_conf (void *cls, const char *section, const char *option,
+read_service_conf (void *cls __attribute__((unused)), const char *section,
const char *option,
const char *value)
{
char *cpy;
@@ -831,12 +831,12 @@
* The messages are one GNUNET_HashCode for the service followed by a struct
tcp_pkt
*/
static int
-receive_tcp_service (void *cls,
+receive_tcp_service (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender
__attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__((unused)))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n");
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
@@ -932,12 +932,12 @@
}
static int
-receive_tcp_remote (void *cls,
+receive_tcp_remote (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender
__attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
@@ -1000,12 +1000,12 @@
}
static int
-receive_udp_remote (void *cls,
+receive_udp_remote (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender
__attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
@@ -1078,12 +1078,12 @@
* The messages are one GNUNET_HashCode for the service, followed by a struct
udp_pkt
*/
static int
-receive_udp_service (void *cls,
+receive_udp_service (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender
__attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
@@ -1184,8 +1184,8 @@
*/
static void
run (void *cls,
- char *const *args,
- const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg_)
+ char *const *args __attribute__((unused)),
+ const char *cfgfile __attribute__((unused)), const struct
GNUNET_CONFIGURATION_Handle *cfg_)
{
static const struct GNUNET_MESH_MessageHandler handlers[] = {
{receive_udp_service, GNUNET_MESSAGE_TYPE_SERVICE_UDP, 0},
Modified: gnunet/src/vpn/gnunet-daemon-vpn-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-dns.c 2011-06-15 07:15:39 UTC (rev
15608)
+++ gnunet/src/vpn/gnunet-daemon-vpn-dns.c 2011-06-15 07:15:40 UTC (rev
15609)
@@ -52,7 +52,7 @@
* {{{
*/
size_t
-send_query(void* cls, size_t size, void* buf) {
+send_query(void* cls __attribute__((unused)), size_t size, void* buf) {
size_t len;
/*
* Send the rehijack-message
@@ -109,7 +109,7 @@
* Connect to the service-dns
*/
void
-connect_to_service_dns (void *cls,
+connect_to_service_dns (void *cls __attribute__((unused)),
const struct GNUNET_SCHEDULER_TaskContext *tc) {
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
@@ -142,7 +142,7 @@
* handle it
*/
void
-dns_answer_handler(void* cls, const struct GNUNET_MessageHeader *msg) {
+dns_answer_handler(void* cls __attribute__((unused)), const struct
GNUNET_MessageHeader *msg) {
/* the service disconnected, reconnect after short wait */
if (msg == NULL)
{
Modified: gnunet/src/vpn/gnunet-daemon-vpn-helper.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-helper.c 2011-06-15 07:15:39 UTC (rev
15608)
+++ gnunet/src/vpn/gnunet-daemon-vpn-helper.c 2011-06-15 07:15:40 UTC (rev
15609)
@@ -132,7 +132,7 @@
* Send an dns-answer-packet to the helper
*/
void
-helper_write(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tsdkctx) {
+helper_write(void* cls __attribute__((unused)), const struct
GNUNET_SCHEDULER_TaskContext* tsdkctx) {
if (tsdkctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)
return;
@@ -205,8 +205,8 @@
* Receive packets from the helper-process
*/
void
-message_token (void *cls,
- void *client, const struct GNUNET_MessageHeader *message)
+message_token (void *cls __attribute__((unused)),
+ void *client __attribute__((unused)), const struct
GNUNET_MessageHeader *message)
{
GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER);
Modified: gnunet/src/vpn/gnunet-daemon-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn.c 2011-06-15 07:15:39 UTC (rev 15608)
+++ gnunet/src/vpn/gnunet-daemon-vpn.c 2011-06-15 07:15:40 UTC (rev 15609)
@@ -65,7 +65,7 @@
*{{{
*/
static void
-cleanup(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tskctx) {
+cleanup(void* cls __attribute__((unused)), const struct
GNUNET_SCHEDULER_TaskContext* tskctx) {
GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
/* stop the helper */
@@ -108,7 +108,7 @@
}
static void
-collect_mappings(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tc) {
+collect_mappings(void* cls __attribute__((unused)), const struct
GNUNET_SCHEDULER_TaskContext* tc) {
if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
return;
@@ -126,6 +126,9 @@
void
send_icmp_response(void* cls, const struct GNUNET_SCHEDULER_TaskContext *tc) {
+ if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
+ return;
+
struct ip6_icmp* request = cls;
struct ip6_icmp* response = alloca(ntohs(request->shdr.size));
@@ -188,7 +191,7 @@
void
send_pkt_to_peer (void *cls,
const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__((unused)))
{
/* peer == NULL means that all peers in this request are connected */
if (peer == NULL) return;
@@ -526,11 +529,11 @@
}
static int
-receive_udp_back (void *cls, struct GNUNET_MESH_Tunnel* tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+receive_udp_back (void *cls __attribute__((unused)), struct
GNUNET_MESH_Tunnel* tunnel,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender
__attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct remote_addr* s = (struct remote_addr*)desc;
@@ -609,11 +612,11 @@
}
static int
-receive_tcp_back (void *cls, struct GNUNET_MESH_Tunnel* tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+receive_tcp_back (void *cls __attribute__((unused)), struct
GNUNET_MESH_Tunnel* tunnel,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender
__attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct remote_addr* s = (struct remote_addr*)desc;
@@ -700,8 +703,8 @@
*/
static void
run (void *cls,
- char *const *args,
- const char *cfgfile,
+ char *const *args __attribute__((unused)),
+ const char *cfgfilep __attribute__((unused)),
const struct GNUNET_CONFIGURATION_Handle *cfg_)
{
static const struct GNUNET_MESH_MessageHandler handlers[] = {
Modified: gnunet/src/vpn/gnunet-service-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-service-dns.c 2011-06-15 07:15:39 UTC (rev 15608)
+++ gnunet/src/vpn/gnunet-service-dns.c 2011-06-15 07:15:40 UTC (rev 15609)
@@ -111,7 +111,7 @@
* Hijack all outgoing DNS-Traffic but for traffic leaving "our" port.
*/
static void
-hijack (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+hijack (void *cls __attribute__((unused)), const struct
GNUNET_SCHEDULER_TaskContext *tc)
{
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
@@ -242,7 +242,7 @@
}
-void mesh_connect (void* cls, const struct GNUNET_PeerIdentity* peer, const
struct GNUNET_TRANSPORT_ATS_Information *atsi) {
+void mesh_connect (void* cls, const struct GNUNET_PeerIdentity* peer, const
struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) {
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %x\n", *((unsigned
long*)peer));
struct tunnel_cls *cls_ = (struct tunnel_cls*)cls;
@@ -276,12 +276,12 @@
}
static int
-receive_mesh_query (void *cls,
+receive_mesh_query (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender
__attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__((unused)))
{
struct dns_pkt *dns = (struct dns_pkt*)(message + 1);
@@ -304,12 +304,12 @@
}
static int
-receive_mesh_answer (void *cls,
+receive_mesh_answer (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender
__attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi
__attribute__((unused)))
{
/* TODo: size check */
struct dns_pkt *dns = (struct dns_pkt *) (message + 1);
@@ -485,10 +485,10 @@
*/
static void
receive_dht(void *cls,
- struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode *key,
- const struct GNUNET_PeerIdentity *const *get_path,
- const struct GNUNET_PeerIdentity *const *put_path,
+ struct GNUNET_TIME_Absolute exp __attribute__((unused)),
+ const GNUNET_HashCode *key __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *const *get_path
__attribute__((unused)),
+ const struct GNUNET_PeerIdentity *const *put_path
__attribute__((unused)),
enum GNUNET_BLOCK_Type type,
size_t size,
const void *data) {
@@ -592,9 +592,9 @@
* This receives a GNUNET_MESSAGE_TYPE_REHIJACK and rehijacks the DNS
*/
static void
-rehijack(void *cls,
+rehijack(void *cls __attribute__((unused)),
struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader *message) {
+ const struct GNUNET_MessageHeader *message __attribute__((unused))) {
unhijack(dnsoutport);
GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, hijack, NULL);
@@ -605,7 +605,7 @@
* This receives the dns-payload from the daemon-vpn and sends it on over the
udp-socket
*/
static void
-receive_query(void *cls,
+receive_query(void *cls __attribute__((unused)),
struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message) {
struct query_packet* pkt = (struct query_packet*)message;
@@ -806,7 +806,7 @@
* Read a response-packet of the UDP-Socket
*/
static void
-read_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+read_response (void *cls __attribute__((unused)), const struct
GNUNET_SCHEDULER_TaskContext *tc)
{
struct sockaddr_in addr;
socklen_t addrlen = sizeof (addr);
@@ -899,7 +899,7 @@
* @param tc unused
*/
static void
-cleanup_task (void *cls,
+cleanup_task (void *cls __attribute__((unused)),
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_assert(0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
@@ -1041,7 +1041,7 @@
* @param section the current section
*/
void
-publish_iterate (void *cls, const char *section)
+publish_iterate (void *cls __attribute__((unused)), const char *section)
{
char *udp_redirects, *tcp_redirects, *alternative_names, *alternative_name,
*keyfile;
@@ -1105,7 +1105,7 @@
* Publish a DNS-record in the DHT. This is up to now just for testing.
*/
static void
-publish_names (void *cls,
+publish_names (void *cls __attribute__((unused)),
const struct GNUNET_SCHEDULER_TaskContext *tc) {
char *services;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15609 - in gnunet/src: mesh vpn,
gnunet <=