fixed unused parameters in functions

This commit is contained in:
Serge A. Zaitsev
2017-01-09 15:45:45 +02:00
parent 6038714011
commit 00651bb416
2 changed files with 4 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ static void toggle_cb(struct tray_menu *item) {
} }
static void hello_cb(struct tray_menu *item) { static void hello_cb(struct tray_menu *item) {
(void)item;
printf("hello cb\n"); printf("hello cb\n");
if (strcmp(tray.icon, TRAY_ICON1) == 0) { if (strcmp(tray.icon, TRAY_ICON1) == 0) {
tray.icon = TRAY_ICON2; tray.icon = TRAY_ICON2;
@@ -33,6 +34,7 @@ static void hello_cb(struct tray_menu *item) {
} }
static void quit_cb(struct tray_menu *item) { static void quit_cb(struct tray_menu *item) {
(void)item;
printf("quit cb\n"); printf("quit cb\n");
tray_exit(); tray_exit();
} }
@@ -47,7 +49,7 @@ static struct tray tray = {
{NULL, 0, 0, NULL, NULL}}, {NULL, 0, 0, NULL, NULL}},
}; };
int main(int argc, char *argv[]) { int main() {
if (tray_init(&tray) < 0) { if (tray_init(&tray) < 0) {
printf("failed to create tray\n"); printf("failed to create tray\n");
return 1; return 1;

1
tray.h
View File

@@ -30,6 +30,7 @@ static AppIndicator *indicator = NULL;
static int loop_result = 0; static int loop_result = 0;
static void _tray_menu_cb(GtkMenuItem *item, gpointer data) { static void _tray_menu_cb(GtkMenuItem *item, gpointer data) {
(void)item;
struct tray_menu *m = (struct tray_menu *)data; struct tray_menu *m = (struct tray_menu *)data;
m->cb(m); m->cb(m);
} }