[gnome-shell] Renable compiler warnings and fix a few that show up
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Renable compiler warnings and fix a few that show up
- Date: Tue, 20 May 2014 00:51:48 +0000 (UTC)
commit ff07d3a46aefb9e956f187fe499c5dfcd71b47c8
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon May 19 18:15:39 2014 -0400
Renable compiler warnings and fix a few that show up
The switch to GNOME_COMPILE_WARNINGS() caused -Wall and other
warnings to not actually be used since GNOME_COMPILE_WARNINGS()
just sets WARN_CFLAGS. Add WARN_CFLAGS to AM_CFLAGS so that
it takes effect.
Add -Wno-error=deprecated-declarations so that when -Werror is
enabled, we don't fail on all the deprecated cogl and clutter
symbols.
https://bugzilla.gnome.org/show_bug.cgi?id=730408
configure.ac | 8 ++++++++
src/shell-perf-helper.c | 2 +-
src/st/st-box-layout-child.c | 6 ++++++
src/st/st-texture-cache.c | 2 ++
4 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 40ed129..8b0fe94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -223,6 +223,14 @@ fi
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
GNOME_COMPILE_WARNINGS([error])
+case "$WARN_CFLAGS" in
+ *-Werror*)
+ WARN_CFLAGS="$WARN_CFLAGS -Wno-error=deprecated-declarations"
+ ;;
+esac
+
+AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
+AC_SUBST(AM_CFLAGS)
BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
diff --git a/src/shell-perf-helper.c b/src/shell-perf-helper.c
index 6d955bf..dabaa54 100644
--- a/src/shell-perf-helper.c
+++ b/src/shell-perf-helper.c
@@ -75,7 +75,7 @@ on_timeout (gpointer data)
}
static void
-establish_timeout ()
+establish_timeout (void)
{
if (timeout_id != 0)
g_source_remove (timeout_id);
diff --git a/src/st/st-box-layout-child.c b/src/st/st-box-layout-child.c
index 71a30d8..dab684a 100644
--- a/src/st/st-box-layout-child.c
+++ b/src/st/st-box-layout-child.c
@@ -94,6 +94,9 @@ st_box_layout_child_get_property (GObject *object,
break;
case CLUTTER_BOX_ALIGNMENT_END:
align = ST_ALIGN_END;
+ break;
+ default:
+ g_assert_not_reached ();
}
g_value_set_enum (value, align);
break;
@@ -138,6 +141,9 @@ st_box_layout_child_set_property (GObject *object,
break;
case ST_ALIGN_END:
align = CLUTTER_BOX_ALIGNMENT_END;
+ break;
+ default:
+ g_assert_not_reached ();
}
g_object_set (meta, g_param_spec_get_name (pspec), align, NULL);
break;
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
index 6ec3581..02ab1a3 100644
--- a/src/st/st-texture-cache.c
+++ b/src/st/st-texture-cache.c
@@ -21,6 +21,8 @@
#include "config.h"
+#define COGL_ENABLE_EXPERIMENTAL_API /* for cogl_framebuffer_allocate */
+
#include "st-texture-cache.h"
#include "st-private.h"
#include <gtk/gtk.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]