summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-26 21:27:40 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-26 21:27:40 +0000
commit854f901f491ccda79aee11edc3d59109cb229d28 (patch)
treecfaf27b1e11af5c7504e6825e205d9d1ed2c6035 /avahi-core
parent740bc001fb647255709b5385d5a8a19781722097 (diff)
* avahi-utils: replace python avahi-browse with a version written in C.
* remove -Wunused from GCC command line and use "unused" attribute instead * remove AVAHI_CLIENT_S_FAILURE and AVAHI_CLIENT_S_INVALID since these event's are never forwarded to the client anyway * make use of AVAHI_GCC_NORETURN * really send eror code with StateChange DBUS signals * ignore EINTR in avahi_simple_poll_loop() git-svn-id: file:///home/lennart/svn/public/avahi/trunk@879 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r--avahi-core/avahi-reflector.c2
-rw-r--r--avahi-core/avahi-test.c56
-rw-r--r--avahi-core/browse-dns-server.c4
-rw-r--r--avahi-core/browse.c2
-rw-r--r--avahi-core/conformance-test.c12
-rw-r--r--avahi-core/dns-test.c2
-rw-r--r--avahi-core/entry.c2
-rw-r--r--avahi-core/hashmap-test.c2
-rw-r--r--avahi-core/netlink.c2
-rw-r--r--avahi-core/prioq-test.c4
-rw-r--r--avahi-core/probe-sched.c2
-rw-r--r--avahi-core/querier-test.c8
-rw-r--r--avahi-core/querier.c2
-rw-r--r--avahi-core/query-sched.c2
-rw-r--r--avahi-core/response-sched.c4
-rw-r--r--avahi-core/server.c2
-rw-r--r--avahi-core/timeeventq-test.c2
-rw-r--r--avahi-core/timeeventq.c2
-rw-r--r--avahi-core/update-test.c6
-rw-r--r--avahi-core/wide-area.c2
20 files changed, 61 insertions, 59 deletions
diff --git a/avahi-core/avahi-reflector.c b/avahi-core/avahi-reflector.c
index d4a8947..a383965 100644
--- a/avahi-core/avahi-reflector.c
+++ b/avahi-core/avahi-reflector.c
@@ -31,7 +31,7 @@
#include <avahi-common/simple-watch.h>
#include <avahi-core/core.h>
-int main(int argc, char*argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) {
AvahiServer *server;
AvahiServerConfig config;
int error;
diff --git a/avahi-core/avahi-test.c b/avahi-core/avahi-test.c
index 51a3a03..9123bfe 100644
--- a/avahi-core/avahi-test.c
+++ b/avahi-core/avahi-test.c
@@ -47,13 +47,13 @@ static char *service_name = NULL;
static const AvahiPoll *poll_api;
-static void quit_timeout_callback(AvahiTimeout *timeout, void* userdata) {
+static void quit_timeout_callback(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata) {
AvahiSimplePoll *simple_poll = userdata;
avahi_simple_poll_quit(simple_poll);
}
-static void dump_line(const char *text, void* userdata) {
+static void dump_line(const char *text, AVAHI_GCC_UNUSED void* userdata) {
printf("%s\n", text);
}
@@ -93,8 +93,8 @@ static void record_browser_callback(
AvahiProtocol protocol,
AvahiBrowserEvent event,
AvahiRecord *record,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
char *t;
assert(r);
@@ -110,7 +110,7 @@ static void record_browser_callback(
static void remove_entries(void);
static void create_entries(int new_name);
-static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void* userdata) {
+static void entry_group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("entry group state: %i", state);
if (state == AVAHI_ENTRY_GROUP_COLLISION) {
@@ -122,7 +122,7 @@ static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntry
}
}
-static void server_callback(AvahiServer *s, AvahiServerState state, void* userdata) {
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void* userdata) {
server = s;
avahi_log_debug("server state: %i", state);
@@ -205,14 +205,14 @@ fail:
}
static void hnr_callback(
- AvahiSHostNameResolver *r,
+ AVAHI_GCC_UNUSED AvahiSHostNameResolver *r,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiResolverEvent event,
const char *hostname,
const AvahiAddress *a,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
char t[AVAHI_ADDRESS_STR_MAX];
if (a)
@@ -222,14 +222,14 @@ static void hnr_callback(
}
static void ar_callback(
- AvahiSAddressResolver *r,
+ AVAHI_GCC_UNUSED AvahiSAddressResolver *r,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiResolverEvent event,
const AvahiAddress *a,
const char *hostname,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
char t[AVAHI_ADDRESS_STR_MAX];
avahi_address_snprint(t, sizeof(t), a);
@@ -238,45 +238,45 @@ static void ar_callback(
}
static void db_callback(
- AvahiSDomainBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSDomainBrowser *b,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *domain,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("DB: (%i.%i) <%s> [%s]", iface, protocol, domain, browser_event_to_string(event));
}
static void stb_callback(
- AvahiSServiceTypeBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSServiceTypeBrowser *b,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *service_type,
const char *domain,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("STB: (%i.%i) %s in <%s> [%s]", iface, protocol, service_type, domain, browser_event_to_string(event));
}
static void sb_callback(
- AvahiSServiceBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSServiceBrowser *b,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *name,
const char *service_type,
const char *domain,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("SB: (%i.%i) <%s> as %s in <%s> [%s]", iface, protocol, name, service_type, domain, browser_event_to_string(event));
}
static void sr_callback(
- AvahiSServiceResolver *r,
+ AVAHI_GCC_UNUSED AvahiSServiceResolver *r,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiResolverEvent event,
@@ -287,8 +287,8 @@ static void sr_callback(
const AvahiAddress *a,
uint16_t port,
AvahiStringList *txt,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
if (event != AVAHI_RESOLVER_FOUND)
avahi_log_debug("SR: (%i.%i) <%s> as %s in <%s> [%s]", iface, protocol, name, service_type, domain_name, resolver_event_to_string(event));
@@ -304,15 +304,15 @@ static void sr_callback(
}
static void dsb_callback(
- AvahiSDNSServerBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSDNSServerBrowser *b,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char*hostname,
const AvahiAddress *a,
uint16_t port,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
char t[AVAHI_ADDRESS_STR_MAX] = "n/a";
@@ -322,7 +322,7 @@ static void dsb_callback(
avahi_log_debug("DSB: (%i.%i): %s/%s:%i [%s]", iface, protocol, hostname, t, port, browser_event_to_string(event));
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiSRecordBrowser *r;
AvahiSHostNameResolver *hnr;
AvahiSAddressResolver *ar;
diff --git a/avahi-core/browse-dns-server.c b/avahi-core/browse-dns-server.c
index ba0aeaa..48d23ad 100644
--- a/avahi-core/browse-dns-server.c
+++ b/avahi-core/browse-dns-server.c
@@ -96,8 +96,8 @@ static void server_info_free(AvahiSDNSServerBrowser *b, AvahiDNSServerInfo *i) {
static void host_name_resolver_callback(
AvahiSHostNameResolver *r,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiIfIndex interface,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiResolverEvent event,
const char *host_name,
const AvahiAddress *a,
diff --git a/avahi-core/browse.c b/avahi-core/browse.c
index caf59e7..dd4fe3c 100644
--- a/avahi-core/browse.c
+++ b/avahi-core/browse.c
@@ -454,7 +454,7 @@ static void lookup_drop_cname(AvahiSRBLookup *l, AvahiIfIndex interface, AvahiPr
}
}
-static void defer_callback(AvahiTimeEvent *e, void *userdata) {
+static void defer_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void *userdata) {
AvahiSRecordBrowser *b = userdata;
int n;
diff --git a/avahi-core/conformance-test.c b/avahi-core/conformance-test.c
index 4445fb5..6873b5c 100644
--- a/avahi-core/conformance-test.c
+++ b/avahi-core/conformance-test.c
@@ -47,11 +47,11 @@ static int try = 0;
static AvahiServer *avahi = NULL;
static const AvahiPoll *poll_api;
-static void dump_line(const char *text, void* userdata) {
+static void dump_line(const char *text, AVAHI_GCC_UNUSED void* userdata) {
printf("%s\n", text);
}
-static void dump_timeout_callback(AvahiTimeout *timeout, void* data) {
+static void dump_timeout_callback(AvahiTimeout *timeout, AVAHI_GCC_UNUSED void* userdata) {
struct timeval tv;
avahi_server_dump(avahi, dump_line, NULL);
@@ -82,7 +82,7 @@ static void create_service(const char *t) {
try++;
}
-static void rename_timeout_callback(AvahiTimeout *timeout, void *userdata) {
+static void rename_timeout_callback(AvahiTimeout *timeout, AVAHI_GCC_UNUSED void *userdata) {
struct timeval tv;
if (access("flag", F_OK) == 0) {
@@ -94,7 +94,7 @@ static void rename_timeout_callback(AvahiTimeout *timeout, void *userdata) {
poll_api->timeout_update(timeout, &tv);
}
-static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void* userdata) {
+static void entry_group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void* userdata) {
if (state == AVAHI_ENTRY_GROUP_COLLISION)
create_service(NULL);
else if (state == AVAHI_ENTRY_GROUP_ESTABLISHED) {
@@ -103,7 +103,7 @@ static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntry
}
}
-static void server_callback(AvahiServer *s, AvahiServerState state, void* userdata) {
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("server state: %i", state);
if (state == AVAHI_SERVER_RUNNING) {
@@ -120,7 +120,7 @@ static void server_callback(AvahiServer *s, AvahiServerState state, void* userda
}
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
int error;
AvahiSimplePoll *simple_poll;
struct timeval tv;
diff --git a/avahi-core/dns-test.c b/avahi-core/dns-test.c
index 2336f42..5634ca5 100644
--- a/avahi-core/dns-test.c
+++ b/avahi-core/dns-test.c
@@ -35,7 +35,7 @@
#include "log.h"
#include "util.h"
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
char t[AVAHI_DOMAIN_NAME_MAX];
const char *a, *b, *c, *d;
AvahiDnsPacket *p;
diff --git a/avahi-core/entry.c b/avahi-core/entry.c
index 1b6ab8b..fd0e233 100644
--- a/avahi-core/entry.c
+++ b/avahi-core/entry.c
@@ -1017,7 +1017,7 @@ static void entry_group_commit_real(AvahiSEntryGroup *g) {
}
}
-static void entry_group_register_time_event_callback(AvahiTimeEvent *e, void* userdata) {
+static void entry_group_register_time_event_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* userdata) {
AvahiSEntryGroup *g = userdata;
assert(g);
diff --git a/avahi-core/hashmap-test.c b/avahi-core/hashmap-test.c
index a57cf8b..9826d53 100644
--- a/avahi-core/hashmap-test.c
+++ b/avahi-core/hashmap-test.c
@@ -31,7 +31,7 @@
#include "hashmap.h"
#include "util.h"
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
unsigned n;
AvahiHashmap *m;
const char *t;
diff --git a/avahi-core/netlink.c b/avahi-core/netlink.c
index 554f25a..b2a6684 100644
--- a/avahi-core/netlink.c
+++ b/avahi-core/netlink.c
@@ -76,7 +76,7 @@ int avahi_netlink_work(AvahiNetlink *nl, int block) {
return 0;
}
-static void socket_event(AvahiWatch *w, int fd, AvahiWatchEvent event, void *userdata) {
+static void socket_event(AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event, void *userdata) {
AvahiNetlink *nl = userdata;
assert(w);
diff --git a/avahi-core/prioq-test.c b/avahi-core/prioq-test.c
index 0e43702..d85a222 100644
--- a/avahi-core/prioq-test.c
+++ b/avahi-core/prioq-test.c
@@ -28,6 +28,8 @@
#include <stdio.h>
#include <assert.h>
+#include <avahi-common/gccmacro.h>
+
#include "prioq.h"
#define POINTER_TO_INT(p) ((int) (p))
@@ -80,7 +82,7 @@ static void rec(AvahiPrioQueueNode *n) {
rec(n->right);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiPrioQueue *q, *q2;
int i;
diff --git a/avahi-core/probe-sched.c b/avahi-core/probe-sched.c
index 7a302c3..cc2b2ec 100644
--- a/avahi-core/probe-sched.c
+++ b/avahi-core/probe-sched.c
@@ -214,7 +214,7 @@ static int packet_add_probe_query(AvahiProbeScheduler *s, AvahiDnsPacket *p, Ava
return 1;
}
-static void elapse_callback(AvahiTimeEvent *e, void* data) {
+static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) {
AvahiProbeJob *pj = data, *next;
AvahiProbeScheduler *s;
AvahiDnsPacket *p;
diff --git a/avahi-core/querier-test.c b/avahi-core/querier-test.c
index 6ba33d0..1c28ea0 100644
--- a/avahi-core/querier-test.c
+++ b/avahi-core/querier-test.c
@@ -65,11 +65,11 @@ static void sb_callback(
const char *service_type,
const char *domain,
AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("SB%i: (%i.%s) <%s> as <%s> in <%s> [%s] cached=%i", b == service_browser1 ? 1 : 2, iface, avahi_proto_to_string(protocol), name, service_type, domain, browser_event_to_string(event), !!(flags & AVAHI_LOOKUP_RESULT_CACHED));
}
-static void create_second_service_browser(AvahiTimeout *timeout, void* userdata) {
+static void create_second_service_browser(AvahiTimeout *timeout, AVAHI_GCC_UNUSED void* userdata) {
service_browser2 = avahi_s_service_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, SERVICE_TYPE, DOMAIN, 0, sb_callback, NULL);
assert(service_browser2);
@@ -77,11 +77,11 @@ static void create_second_service_browser(AvahiTimeout *timeout, void* userdata)
poll_api->timeout_free(timeout);
}
-static void quit(AvahiTimeout *timeout, void *userdata) {
+static void quit(AVAHI_GCC_UNUSED AvahiTimeout *timeout, AVAHI_GCC_UNUSED void *userdata) {
avahi_simple_poll_quit(simple_poll);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
struct timeval tv;
AvahiServerConfig config;
diff --git a/avahi-core/querier.c b/avahi-core/querier.c
index a58d387..41acc24 100644
--- a/avahi-core/querier.c
+++ b/avahi-core/querier.c
@@ -58,7 +58,7 @@ void avahi_querier_free(AvahiQuerier *q) {
avahi_free(q);
}
-static void querier_elapse_callback(AvahiTimeEvent *e, void *userdata) {
+static void querier_elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void *userdata) {
AvahiQuerier *q = userdata;
struct timeval tv;
diff --git a/avahi-core/query-sched.c b/avahi-core/query-sched.c
index d7d8ab0..0096838 100644
--- a/avahi-core/query-sched.c
+++ b/avahi-core/query-sched.c
@@ -254,7 +254,7 @@ static void append_known_answers_and_send(AvahiQueryScheduler *s, AvahiDnsPacket
avahi_dns_packet_free(p);
}
-static void elapse_callback(AvahiTimeEvent *e, void* data) {
+static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) {
AvahiQueryJob *qj = data;
AvahiQueryScheduler *s;
AvahiDnsPacket *p;
diff --git a/avahi-core/response-sched.c b/avahi-core/response-sched.c
index 6883771..7ab5575 100644
--- a/avahi-core/response-sched.c
+++ b/avahi-core/response-sched.c
@@ -188,7 +188,7 @@ void avahi_response_scheduler_clear(AvahiResponseScheduler *s) {
job_free(s, s->suppressed);
}
-static void enumerate_aux_records_callback(AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata) {
+static void enumerate_aux_records_callback(AVAHI_GCC_UNUSED AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata) {
AvahiResponseJob *rj = userdata;
assert(r);
@@ -265,7 +265,7 @@ static void send_response_packet(AvahiResponseScheduler *s, AvahiResponseJob *rj
avahi_dns_packet_free(p);
}
-static void elapse_callback(AvahiTimeEvent *e, void* data) {
+static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) {
AvahiResponseJob *rj = data;
assert(rj);
diff --git a/avahi-core/server.c b/avahi-core/server.c
index 7b0a56e..700b3a8 100644
--- a/avahi-core/server.c
+++ b/avahi-core/server.c
@@ -1104,7 +1104,7 @@ void avahi_server_decrease_host_rr_pending(AvahiServer *s) {
server_set_state(s, AVAHI_SERVER_RUNNING);
}
-void avahi_host_rr_entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
+void avahi_host_rr_entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
assert(s);
assert(g);
diff --git a/avahi-core/timeeventq-test.c b/avahi-core/timeeventq-test.c
index 46a948a..c66a55a 100644
--- a/avahi-core/timeeventq-test.c
+++ b/avahi-core/timeeventq-test.c
@@ -45,7 +45,7 @@ static void callback(AvahiTimeEvent*e, void* userdata) {
avahi_time_event_update(e, &tv);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
struct timeval tv;
AvahiSimplePoll *s;
diff --git a/avahi-core/timeeventq.c b/avahi-core/timeeventq.c
index e8782c9..17334ee 100644
--- a/avahi-core/timeeventq.c
+++ b/avahi-core/timeeventq.c
@@ -75,7 +75,7 @@ static void update_timeout(AvahiTimeEventQueue *q) {
q->poll_api->timeout_update(q->timeout, NULL);
}
-static void expiration_event(AvahiTimeout *timeout, void *userdata) {
+static void expiration_event(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void *userdata) {
AvahiTimeEventQueue *q = userdata;
AvahiTimeEvent *e;
diff --git a/avahi-core/update-test.c b/avahi-core/update-test.c
index fbfd51a..017397b 100644
--- a/avahi-core/update-test.c
+++ b/avahi-core/update-test.c
@@ -40,7 +40,7 @@
static AvahiSEntryGroup *group = NULL;
-static void server_callback(AvahiServer *s, AvahiServerState state, void* userdata) {
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("server state: %i", state);
@@ -57,7 +57,7 @@ static void server_callback(AvahiServer *s, AvahiServerState state, void* userda
}
}
-static void modify_txt_callback(AvahiTimeout *e, void *userdata) {
+static void modify_txt_callback(AVAHI_GCC_UNUSED AvahiTimeout *e, void *userdata) {
int ret;
AvahiServer *s = userdata;
@@ -65,7 +65,7 @@ static void modify_txt_callback(AvahiTimeout *e, void *userdata) {
assert(ret == AVAHI_OK);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiSimplePoll *simple_poll;
const AvahiPoll *poll_api;
AvahiServer *server;
diff --git a/avahi-core/wide-area.c b/avahi-core/wide-area.c
index 51e192e..f191074 100644
--- a/avahi-core/wide-area.c
+++ b/avahi-core/wide-area.c
@@ -551,7 +551,7 @@ finish:
}
}
-static void socket_event(AvahiWatch *w, int fd, AvahiWatchEvent events, void *userdata) {
+static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent events, void *userdata) {
AvahiWideAreaLookupEngine *e = userdata;
AvahiAddress a;
AvahiDnsPacket *p = NULL;