Fatal Error while compiling indicator-desktopnova-1.0.0

Bug #942787 reported by Pascal Mons
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Making all in src
make[2]: Entering directory `/usr/local/src/indicator-desktopnova-1.0.0/src'
gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/libxml2 -DSHAREDIR=\"/usr/share/indicator-desktopnova/\" -DLIBDIR=\"/usr/lib/indicator-desktopnova/\" -DHTMLDIR=\"/usr/share/doc/indicator-desktopnova/\" -rdynamic -Wall -Werror -D_GNU_SOURCE -DLOCALE_DIR=\"/usr/share/locale/\" -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libappindicator-0.1 -I/usr/include/libdbusmenu-0.4 -g -O2 -MT indicator_desktopnova-tray.o -MD -MP -MF .deps/indicator_desktopnova-tray.Tpo -c -o indicator_desktopnova-tray.o `test -f 'tray.c' || echo './'`tray.c
tray.c: In function ‘update_status’:
tray.c:169:10: error: variable ‘tooltip’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[2]: *** [indicator_desktopnova-tray.o] Error 1
make[2]: Leaving directory `/usr/local/src/indicator-desktopnova-1.0.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/indicator-desktopnova-1.0.0'
make: *** [all] Error 2

The function is declared as such

void update_status() {
    Copyright (C) 2008-2010 Stefan Haller
 gchar * tooltip = NULL;

 if (error != NULL) {
  tooltip = error;
// gtk_status_icon_set_from_file(status, ERROR_ICON);
 } else {
  tooltip = _("DesktopNova");
// gtk_status_icon_set_from_file(status, NORMAL_ICON);

// gtk_status_icon_set_tooltip(status, tooltip);

the variable tooltip is declared and assigned a value.
But in either case of the if, a value is assigned to this variable, hence there is not need to set it.
--> Compiler warning

However may be an option of the gcc : cc1 is telling it to treat all warnings as errors.

I tried to remove the NULL assignment, keeping only the gchar * tooptip; but it ended with the same error.
 I have no experience of gtk programing.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers