summaryrefslogtreecommitdiffstats
path: root/avahi-discover-standalone/main.c
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-discover-standalone/main.c
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-discover-standalone/main.c')
-rw-r--r--avahi-discover-standalone/main.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/avahi-discover-standalone/main.c b/avahi-discover-standalone/main.c
index 74dabd7..e77a007 100644
--- a/avahi-discover-standalone/main.c
+++ b/avahi-discover-standalone/main.c
@@ -125,15 +125,15 @@ static void free_service(struct Service *s) {
}
static void service_browser_callback(
- AvahiSServiceBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSServiceBrowser *b,
AvahiIfIndex interface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *service_name,
const char *service_type,
const char *domain_name,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
if (event == AVAHI_BROWSER_NEW) {
struct Service *s;
@@ -177,14 +177,14 @@ static void service_browser_callback(
}
static void service_type_browser_callback(
- AvahiSServiceTypeBrowser *b,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiSServiceTypeBrowser *b,
+ AVAHI_GCC_UNUSED AvahiIfIndex interface,
+ AVAHI_GCC_UNUSED 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) {
struct ServiceType *st;
GtkTreePath *path;
@@ -268,17 +268,17 @@ static struct Service *get_service_on_cursor(void) {
static void service_resolver_callback(
AvahiSServiceResolver *r,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiIfIndex interface,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiResolverEvent event,
- const char *name,
- const char *type,
- const char *domain,
+ AVAHI_GCC_UNUSED const char *name,
+ AVAHI_GCC_UNUSED const char *type,
+ AVAHI_GCC_UNUSED const char *domain,
const char *host_name,
const AvahiAddress *a,
uint16_t port,
AvahiStringList *txt,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void* userdata) {
struct Service *s;
@@ -299,7 +299,7 @@ static void service_resolver_callback(
update_label(s, host_name, a, port, txt);
}
-static void tree_view_on_cursor_changed(GtkTreeView *tv, gpointer userdata) {
+static void tree_view_on_cursor_changed(AVAHI_GCC_UNUSED GtkTreeView *tv, AVAHI_GCC_UNUSED gpointer userdata) {
struct Service *s;
if (!(s = get_service_on_cursor()))
@@ -313,7 +313,7 @@ static void tree_view_on_cursor_changed(GtkTreeView *tv, gpointer userdata) {
service_resolver = avahi_s_service_resolver_new(server, s->interface, s->protocol, s->service_name, s->service_type->service_type, s->domain_name, AVAHI_PROTO_UNSPEC, 0, service_resolver_callback, s);
}
-static gboolean main_window_on_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data) {
+static gboolean main_window_on_delete_event(AVAHI_GCC_UNUSED GtkWidget *widget, AVAHI_GCC_UNUSED GdkEvent *event, AVAHI_GCC_UNUSED gpointer user_data) {
gtk_main_quit();
return FALSE;
}