From 21dd860429b6a3065118fdba4b298cdb19c28d15 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 27 Oct 2005 19:43:09 +0000 Subject: [PATCH] remove a bunch of compiler warnings git-svn-id: file:///home/lennart/svn/public/avahi/trunk@898 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-client/entrygroup.c | 4 ++-- avahi-core/announce.c | 6 +++--- avahi-core/server.c | 6 +++--- avahi-core/wide-area.c | 4 ++-- avahi-daemon/dbus-protocol.c | 2 +- avahi-daemon/main.c | 10 +++++----- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/avahi-client/entrygroup.c b/avahi-client/entrygroup.c index e94001b..50afb12 100644 --- a/avahi-client/entrygroup.c +++ b/avahi-client/entrygroup.c @@ -51,7 +51,7 @@ void avahi_entry_group_set_state(AvahiEntryGroup *group, AvahiEntryGroupState st } static int retrieve_state(AvahiEntryGroup *group) { - DBusMessage *message, *reply; + DBusMessage *message = NULL, *reply = NULL; DBusError error; int r = AVAHI_OK; int32_t state; @@ -279,7 +279,7 @@ AvahiClient* avahi_entry_group_get_client (AvahiEntryGroup *group) { } int avahi_entry_group_is_empty (AvahiEntryGroup *group) { - DBusMessage *message, *reply; + DBusMessage *message = NULL, *reply = NULL; DBusError error; int r = AVAHI_OK; int b; diff --git a/avahi-core/announce.c b/avahi-core/announce.c index 4fa73e2..061f104 100644 --- a/avahi-core/announce.c +++ b/avahi-core/announce.c @@ -206,7 +206,7 @@ static AvahiAnnouncer *get_announcer(AvahiServer *s, AvahiEntry *e, AvahiInterfa return NULL; } -static void go_to_initial_state(AvahiAnnouncer *a, int immediately) { +static void go_to_initial_state(AvahiAnnouncer *a) { AvahiEntry *e; struct timeval tv; @@ -271,7 +271,7 @@ static void new_announcer(AvahiServer *s, AvahiInterface *i, AvahiEntry *e) { AVAHI_LLIST_PREPEND(AvahiAnnouncer, by_interface, i->announcers, a); AVAHI_LLIST_PREPEND(AvahiAnnouncer, by_entry, e->announcers, a); - go_to_initial_state(a, 0); + go_to_initial_state(a); /* avahi_log_debug("New announcer on interface %s.%i for entry [%s] state=%i", i->hardware->name, i->protocol, t = avahi_record_to_string(e->record), a->state); */ /* avahi_free(t); */ @@ -369,7 +369,7 @@ void avahi_entry_return_to_initial_state(AvahiServer *s, AvahiEntry *e, AvahiInt if (a->state == AVAHI_PROBING && a->entry->group) a->entry->group->n_probing--; - go_to_initial_state(a, 1); + go_to_initial_state(a); } static AvahiRecord *make_goodbye_record(AvahiRecord *r) { diff --git a/avahi-core/server.c b/avahi-core/server.c index 700b3a8..0978385 100644 --- a/avahi-core/server.c +++ b/avahi-core/server.c @@ -236,7 +236,7 @@ static void incoming_probe(AvahiServer *s, AvahiRecord *record, AvahiInterface * } } -static int handle_conflict(AvahiServer *s, AvahiInterface *i, AvahiRecord *record, int unique, const AvahiAddress *a) { +static int handle_conflict(AvahiServer *s, AvahiInterface *i, AvahiRecord *record, int unique) { int valid = 1, ours = 0, conflict = 0, withdraw_immediately = 0; AvahiEntry *e, *n, *conflicting_entry = NULL; @@ -591,7 +591,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac goto fail; } - if (handle_conflict(s, i, record, unique, a)) { + if (handle_conflict(s, i, record, unique)) { avahi_response_scheduler_suppress(i->response_scheduler, record, a); avahi_record_list_drop(s->record_list, record); avahi_cache_stop_poof(i->cache, record, a); @@ -655,7 +655,7 @@ static void handle_response_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInter /* avahi_log_debug("Handling response: %s", txt = avahi_record_to_string(record)); */ /* avahi_free(txt); */ - if (handle_conflict(s, i, record, cache_flush, a)) { + if (handle_conflict(s, i, record, cache_flush)) { if (!from_local_iface) reflect_response(s, i, record, cache_flush); avahi_cache_update(i->cache, record, cache_flush, a); diff --git a/avahi-core/wide-area.c b/avahi-core/wide-area.c index f191074..fdd35c0 100644 --- a/avahi-core/wide-area.c +++ b/avahi-core/wide-area.c @@ -478,7 +478,7 @@ static int map_dns_error(uint16_t error) { return table[error]; } -static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p, AvahiAddress *a) { +static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p) { AvahiWideAreaLookup *l = NULL; int i, r; @@ -571,7 +571,7 @@ static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSE } if (p) { - handle_packet(e, p, &a); + handle_packet(e, p); avahi_dns_packet_free(p); } } diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c index 60edec2..a42cb2b 100644 --- a/avahi-daemon/dbus-protocol.c +++ b/avahi-daemon/dbus-protocol.c @@ -628,7 +628,7 @@ fail: } -static DBusHandlerResult msg_signal_filter_impl(AVAHI_GCC_UNUSED DBusConnection *c, DBusMessage *m, void *userdata) { +static DBusHandlerResult msg_signal_filter_impl(AVAHI_GCC_UNUSED DBusConnection *c, DBusMessage *m, AVAHI_GCC_UNUSED void *userdata) { DBusError error; dbus_error_init(&error); diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 8d1a496..6f0624d 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -117,7 +117,7 @@ static int has_prefix(const char *s, const char *prefix) { return strlen(s) >= l && strncmp(s, prefix, l) == 0; } -static int load_resolv_conf(const DaemonConfig *c) { +static int load_resolv_conf(void) { int ret = -1; FILE *f; int i = 0; @@ -594,7 +594,7 @@ static void signal_callback(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AVAHI_GC if (resolv_conf_entry_group) avahi_s_entry_group_reset(resolv_conf_entry_group); - load_resolv_conf(&config); + load_resolv_conf(); update_wide_area_servers(); @@ -617,8 +617,8 @@ static void signal_callback(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AVAHI_GC static int run_server(DaemonConfig *c) { int r = -1; int error; - const AvahiPoll *poll_api; - AvahiWatch *sig_watch; + const AvahiPoll *poll_api = NULL; + AvahiWatch *sig_watch = NULL; assert(c); @@ -657,7 +657,7 @@ static int run_server(DaemonConfig *c) { #endif } - load_resolv_conf(c); + load_resolv_conf(); static_service_load(); if (!(avahi_server = avahi_server_new(poll_api, &c->server_config, server_callback, c, &error))) { -- 2.39.5