From d8c829fa0ce155ffe22a697250f66b741fc29f09 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Sep 2011 07:34:52 +0200 Subject: configure.ac: pass AM_CXXFLAGS, AM_CPPFLAGS to Makefile.am --- Makefile.am | 2 +- configure.ac | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index b3620bdeb..5e6747e6d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = foreign 1.10 dist-bzip2 subdir-objects -AM_CPPFLAGS = -I$(srcdir)/src $(GLIB_CFLAGS) +AM_CPPFLAGS += -I$(srcdir)/src $(GLIB_CFLAGS) AM_CPPFLAGS += -DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"' diff --git a/configure.ac b/configure.ac index 559284332..24b9a857d 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,9 @@ PKG_PROG_PKG_CONFIG dnl --------------------------------------------------------------------------- dnl Declare Variables dnl --------------------------------------------------------------------------- +AC_SUBST(AM_CPPFLAGS,"") AC_SUBST(AM_CFLAGS,"") +AC_SUBST(AM_CXXFLAGS,"") AC_SUBST(MPD_LIBS) AC_SUBST(MPD_CFLAGS) -- cgit v1.2.3 From 344b6dd179d1312cf370f1fbdcddc11370c52f73 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Sep 2011 07:38:00 +0200 Subject: configure.ac: enable -Werror for C++ --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 24b9a857d..1c0a38ce1 100644 --- a/configure.ac +++ b/configure.ac @@ -1480,6 +1480,7 @@ fi dnl ---------------------------- warnings as errors --------------------------- if test "x$enable_werror" = xyes; then AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors" + AM_CXXFLAGS="$AM_CXXFLAGS -Werror" fi dnl --------------------------------------------------------------------------- -- cgit v1.2.3 From 1cbba4fc592654dc3a2a1fe337ed699d6a102b09 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Sep 2011 07:41:07 +0200 Subject: input/curl, output/pulse: fix "unused local variable" warnings --- src/input/curl_input_plugin.c | 2 +- src/output/pulse_output_plugin.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c index 2c4ac2ff8..604965dd1 100644 --- a/src/input/curl_input_plugin.c +++ b/src/input/curl_input_plugin.c @@ -177,7 +177,7 @@ buffer_free_callback(gpointer data, G_GNUC_UNUSED gpointer user_data) assert(buffer->consumed <= buffer->size); - g_free(data); + g_free(buffer); } /** diff --git a/src/output/pulse_output_plugin.c b/src/output/pulse_output_plugin.c index 34d736546..911835e46 100644 --- a/src/output/pulse_output_plugin.c +++ b/src/output/pulse_output_plugin.c @@ -72,7 +72,8 @@ pulse_output_set_mixer(struct pulse_output *po, struct pulse_mixer *pm) } void -pulse_output_clear_mixer(struct pulse_output *po, struct pulse_mixer *pm) +pulse_output_clear_mixer(struct pulse_output *po, + G_GNUC_UNUSED struct pulse_mixer *pm) { assert(po != NULL); assert(pm != NULL); -- cgit v1.2.3 From 443e96381a0e24d9c22578ba6f7fb96de1814994 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Sep 2011 07:31:06 +0200 Subject: configure.ac: disable assertions in the non-debugging build Add -DNDEBUG to AM_CPPFLAGS. --- NEWS | 1 + configure.ac | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 9bd893930..90d3b0fca 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.16.5 (2010/??/??) +* configure.ac: disable assertions in the non-debugging build * pcm_format: fix 32-to-24 bit conversion (the "silence" bug) * input: - rewind: reduce heap usage diff --git a/configure.ac b/configure.ac index 1c0a38ce1..9a9576271 100644 --- a/configure.ac +++ b/configure.ac @@ -1451,10 +1451,9 @@ dnl CFLAGS dnl --------------------------------------------------------------------------- dnl ---------------------------------- debug ---------------------------------- -#if test "x$enable_debug" = xno; then - # don't set NDEBUG for now, until MPD is stable - #AM_CFLAGS="$AM_CFLAGS -DNDEBUG" -#fi +if test "x$enable_debug" = xno; then + AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG" +fi dnl ----------------------------------- GCC ----------------------------------- if test x$GCC = xyes -- cgit v1.2.3