Use BASECXXFLAGS rather then AM_CXXFLAGS to make AM_CFLAGS
Rationalize BASECXXFLAGS, adding -Werror and removing -Wno-uninitialized
(since the bug preventing it being used is long fixed)
Fix a bug detected by -Wuninitialized
Build C++ code with -std=gnu++11 -Wno-deprecated-declarations
---
 Makefile.am | 9 ++++-----
 ini.cc      | 2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7fa61e9..044a1ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,13 +21,12 @@ SUBDIRS := @subdirs@ tests
 
 # We would like to use -Winline for C++ as well, but some STL code triggers
 # this warning. (Bug verified present in gcc-3.3)
-# -Wno-uninitialized added to deal with g++ 3.4.4's spurious STL warnings
-# (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22207)
-BASECXXFLAGS = -Wall -Wno-uninitialized -Wpointer-arith -Wcomments \
+BASECXXFLAGS = -Werror -Wall -Wpointer-arith -Wcomments \
               -Wcast-align -Wwrite-strings -fno-builtin-sscanf \
               -Wno-attributes
-AM_CXXFLAGS = -Werror $(BASECXXFLAGS) ${$(*F)_CXXFLAGS}
-AM_CFLAGS = $(AM_CXXFLAGS) -Wmissing-declarations -Winline \
+AM_CXXFLAGS = $(BASECXXFLAGS) -std=gnu++11 -Wno-deprecated-declarations \
+             ${$(*F)_CXXFLAGS}
+AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \
            -Wstrict-prototypes -Wmissing-prototypes
 AM_YFLAGS = -d
 AM_LFLAGS = -8
diff --git a/ini.cc b/ini.cc
index f925bf5..82990a2 100644
--- a/ini.cc
+++ b/ini.cc
@@ -270,7 +270,7 @@ do_remote_ini (HWND owner)
   size_t ini_count = 0;
   GuiParseFeedback myFeedback;
   IniDBBuilderPackage aBuilder (myFeedback);
-  io_stream *ini_file, *ini_sig_file;
+  io_stream *ini_file = NULL, *ini_sig_file;
 
   /* FIXME: Get rid of this io_stream pointer travesty.  The need to
      explicitly delete these things is ridiculous. */
-- 
2.8.3

Reply via email to