]> git.meshlink.io Git - catta/commitdiff
remove a bunch of compiler warnings
authorLennart Poettering <lennart@poettering.net>
Thu, 27 Oct 2005 19:43:09 +0000 (19:43 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 27 Oct 2005 19:43:09 +0000 (19:43 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@898 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-client/entrygroup.c
avahi-core/announce.c
avahi-core/server.c
avahi-core/wide-area.c
avahi-daemon/dbus-protocol.c
avahi-daemon/main.c

index e94001b796f85022754ddb5e4b080d2cc474db89..50afb126c41589f873fb1762b26a60ce2ff24049 100644 (file)
@@ -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;
index 4fa73e26971dab64ca02d75db00fd5c5f7e3eaa1..061f10440b445efd684bca75212ac65fae44f388 100644 (file)
@@ -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) {
index 700b3a8eabc3fb6db7266dfeb6e9ef3eff5f09ca..0978385948e9790908b900d51fde783019d02089 100644 (file)
@@ -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);
index f191074554c01bb9630b7d4c6e6f5988ff46a883..fdd35c063468225be35bb254a96dc20a0c81950c 100644 (file)
@@ -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);
     }
 }
index 60edec2c13dbd65bf4cb154d947a95316cff9c3c..a42cb2b3e57b7dde470e8f5ca590dacce1ff282a 100644 (file)
@@ -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);
index 8d1a496cd9094f0664c3ba396b091c8cce622193..6f0624d3ae96389ce30c5dcefa308331a9cbf429 100644 (file)
@@ -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))) {