diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-10-26 21:27:40 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-10-26 21:27:40 +0000 |
commit | 854f901f491ccda79aee11edc3d59109cb229d28 (patch) | |
tree | cfaf27b1e11af5c7504e6825e205d9d1ed2c6035 /avahi-glib | |
parent | 740bc001fb647255709b5385d5a8a19781722097 (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-glib')
-rw-r--r-- | avahi-glib/glib-watch-test.c | 8 | ||||
-rw-r--r-- | avahi-glib/glib-watch.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/avahi-glib/glib-watch-test.c b/avahi-glib/glib-watch-test.c index 73114d1..733c81f 100644 --- a/avahi-glib/glib-watch-test.c +++ b/avahi-glib/glib-watch-test.c @@ -31,12 +31,14 @@ #include <avahi-common/watch.h> #include <avahi-common/timeval.h> +#include <avahi-common/gccmacro.h> + #include "glib-watch.h" static const AvahiPoll *api = NULL; static GMainLoop *loop = NULL; -static void callback(AvahiWatch *w, int fd, AvahiWatchEvent event, void *userdata) { +static void callback(AvahiWatch *w, int fd, AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) { if (event & AVAHI_WATCH_IN) { ssize_t r; @@ -52,7 +54,7 @@ static void callback(AvahiWatch *w, int fd, AvahiWatchEvent event, void *userdat } } -static void wakeup(AvahiTimeout *t, void *userdata) { +static void wakeup(AvahiTimeout *t, AVAHI_GCC_UNUSED void *userdata) { struct timeval tv; static int i = 0; @@ -65,7 +67,7 @@ static void wakeup(AvahiTimeout *t, void *userdata) { api->timeout_update(t, &tv); } -int main(int argc, char *argv[]) { +int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { AvahiGLibPoll *g; struct timeval tv; diff --git a/avahi-glib/glib-watch.c b/avahi-glib/glib-watch.c index a99cb4d..9d80440 100644 --- a/avahi-glib/glib-watch.c +++ b/avahi-glib/glib-watch.c @@ -300,7 +300,7 @@ static gboolean check_func(GSource *source) { return FALSE; } -static gboolean dispatch_func(GSource *source, GSourceFunc callback, gpointer userdata) { +static gboolean dispatch_func(GSource *source, AVAHI_GCC_UNUSED GSourceFunc callback, AVAHI_GCC_UNUSED gpointer userdata) { AvahiGLibPoll* g = (AvahiGLibPoll*) source; AvahiWatch *w; AvahiTimeout *next_timeout; |