diff --git a/example.c b/example.c index d79e8ef..fe9efdd 100644 --- a/example.c +++ b/example.c @@ -23,6 +23,7 @@ static void toggle_cb(struct tray_menu *item) { } static void hello_cb(struct tray_menu *item) { + (void)item; printf("hello cb\n"); if (strcmp(tray.icon, TRAY_ICON1) == 0) { tray.icon = TRAY_ICON2; @@ -33,6 +34,7 @@ static void hello_cb(struct tray_menu *item) { } static void quit_cb(struct tray_menu *item) { + (void)item; printf("quit cb\n"); tray_exit(); } @@ -47,7 +49,7 @@ static struct tray tray = { {NULL, 0, 0, NULL, NULL}}, }; -int main(int argc, char *argv[]) { +int main() { if (tray_init(&tray) < 0) { printf("failed to create tray\n"); return 1; diff --git a/tray.h b/tray.h index e430bc7..f7fbb78 100644 --- a/tray.h +++ b/tray.h @@ -30,6 +30,7 @@ static AppIndicator *indicator = NULL; static int loop_result = 0; static void _tray_menu_cb(GtkMenuItem *item, gpointer data) { + (void)item; struct tray_menu *m = (struct tray_menu *)data; m->cb(m); }