summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@gnome.org>2007-07-04 14:20:33 -0500
committerJonathon Jongsma <jjongsma@gnome.org>2007-07-04 14:25:26 -0500
commitebd5ef60afb32e88b0ab8c4c690aea3fc5b82085 (patch)
tree4cef62b7a8f5ab03bcd4ad5ad3f346686bf9f101
parenta37414aa4f698a66550fbc87543efa0a74109b18 (diff)
Enable extra compiler warnings and -Werror if the CAIROMM_DEVEL environment
variable is set to 'on'. This caught the following mistake: * cairomm/pattern.cc: forgot to return the ColorStop vector
-rw-r--r--ChangeLog7
-rw-r--r--cairomm/pattern.cc1
-rw-r--r--configure.in5
3 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b3178e..97cac77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-07-04 Jonathon Jongsma <jjongsma@gnome.org>
+ * configure.in: enable extra compiler warnings and -Werror if the
+ CAIROMM_DEVEL environment variable is set to 'on'. This caught the
+ following mistake.
+ * cairomm/pattern.cc: forgot to return the ColorStop vector
+
+2007-07-04 Jonathon Jongsma <jjongsma@gnome.org>
+
* cairomm/context.cc: fix a FIXME to match the style of
ScaledFont::glyph_extents since MSVC (and possibly other compilers) complain
when allocating an array on the stack and the size of the array is not a
diff --git a/cairomm/pattern.cc b/cairomm/pattern.cc
index 94e6088..420ed82 100644
--- a/cairomm/pattern.cc
+++ b/cairomm/pattern.cc
@@ -212,6 +212,7 @@ Gradient::get_color_stops() const
&stop.green, &stop.blue, &stop.alpha);
stops.push_back(stop);
}
+ return stops;
}
diff --git a/configure.in b/configure.in
index f0d935d..9c0d2c6 100644
--- a/configure.in
+++ b/configure.in
@@ -120,7 +120,10 @@ else
fi
AM_CONDITIONAL(AUTOTESTS, test x$ENABLE_TESTS = xyes)
-
+dnl enable compiler warnings when the CAIROMM_DEVEL environment variable is set to 'on'
+if test "x$CAIROMM_DEVEL" = "xon" ; then
+ CXXFLAGS="$CXXFLAGS -Wall -g -Werror -Wextra"
+fi
dnl Check whether to build the documentation directory