From: Leandro Lucarella Date: Tue, 24 Jul 2012 16:19:51 +0000 (+0200) Subject: Add more conservative GCC options to detect bugs X-Git-Tag: v0.3~4 X-Git-Url: https://git.llucax.com/software/sadba.git/commitdiff_plain/6f1b3849d0f6cf5ba2dc515f7b720a3d349d996c?hp=65701ec6c6960d74e28521b27c453e291ed93d33 Add more conservative GCC options to detect bugs Also fix the code to compile with these new options. --- diff --git a/src/Makefile b/src/Makefile index 20c4ad3..bf15039 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,7 +2,7 @@ OBJS=lib-display-blanking-status-menu-widget.o SOURCES=lib-display-blanking-status-menu-widget.c LIB=lib-displayblanking-status-menu.so PKG_FLAGS=$(shell pkg-config hildon-1 libhildondesktop-1 --libs --cflags) -CCFLAGS=-shared +CCFLAGS=-shared -Wall -Werror -pedantic -std=c99 CC=gcc all:$(LIB) diff --git a/src/lib-display-blanking-status-menu-widget.c b/src/lib-display-blanking-status-menu-widget.c index 18beee5..0f0f3f8 100644 --- a/src/lib-display-blanking-status-menu-widget.c +++ b/src/lib-display-blanking-status-menu-widget.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -98,7 +99,7 @@ struct _DisplayBlankingStatusPluginPrivate }; HD_DEFINE_PLUGIN_MODULE (DisplayBlankingStatusPlugin, - display_blanking_status_plugin, HD_TYPE_STATUS_MENU_ITEM); + display_blanking_status_plugin, HD_TYPE_STATUS_MENU_ITEM) static void display_blanking_status_plugin_class_finalize ( @@ -197,8 +198,8 @@ display_blanking_status_plugin_init (DisplayBlankingStatusPlugin *plugin) gconf_client_add_dir (priv->gconf_client, MODE_GCONF_ROOT, GCONF_CLIENT_PRELOAD_NONE, &error); g_assert (error == NULL); - gconf_client_notify_add (priv->gconf_client, MODE_GCONF_KEY, &on_gconf_notify, - priv, NULL, &error); + gconf_client_notify_add (priv->gconf_client, MODE_GCONF_KEY, + (GConfClientNotifyFunc) &on_gconf_notify, priv, NULL, &error); g_assert (error == NULL); gtk_container_add (GTK_CONTAINER (plugin), priv->button);