From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3219 invoked by alias); 24 Aug 2016 14:16:11 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 2939 invoked by uid 89); 24 Aug 2016 14:16:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=H*RU:CriticalPath, Hx-spam-relays-external:CriticalPath, 2113, HCc:D*uk X-HELO: rgout0303.bt.lon5.cpcloud.co.uk Received: from rgout0303.bt.lon5.cpcloud.co.uk (HELO rgout0303.bt.lon5.cpcloud.co.uk) (65.20.0.209) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Aug 2016 14:16:01 +0000 X-OWM-Source-IP: 31.51.206.108 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-Junkmail-Premium-Raw: score=27/50,refid=2.7.2:2016.8.24.125417:17:27.888,ip=31.51.206.108,rules=__HAS_FROM, __TO_MALFORMED_2, __TO_NO_NAME, __HAS_CC_HDR, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __HAS_MSGID, __SANE_MSGID, __HAS_X_MAILER, __IN_REP_TO, __REFERENCES, __FROM_DOMAIN_IN_ANY_CC1, __ANY_URI, __URI_WITH_PATH, __URI_NO_MAILTO, __URI_NO_WWW, __CP_URI_IN_BODY, __FRAUD_MONEY_CURRENCY_DOLLAR, __URI_IN_BODY, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1800_1899, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, __URI_NS, SXL_IP_DYNAMIC[108.206.51.31.fur], HTML_00_01, HTML_00_10, __FRAUD_MONEY_CURRENCY, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, __SINGLE_URI_TEXT, SINGLE_URI_IN_BODY, BODY_SIZE_2000_LESS, __FROM_DOMAIN_IN_RCPT, RDNS_SUSP, IN_REP_TO, REFERENCES, BODY_SIZE_7000_LESS, NO_URI_HTTPS, MSG_THREAD, __CC_REAL_NAMES, MULTIPLE_REAL_RCPTS, LEGITIMATE_SIGNS, LEGITIMATE_NEGATE Received: from localhost.localdomain (31.51.206.108) by rgout03.bt.lon5.cpcloud.co.uk (8.6.122.06) (authenticated as jonturney@btinternet.com) id 57BCDABA00137E15; Wed, 24 Aug 2016 15:15:58 +0100 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH setup 1/4] Build C++ code with -std=gnu++11 Date: Wed, 24 Aug 2016 14:16:00 -0000 Message-Id: <20160824141537.34836-2-jon.turney@dronecode.org.uk> In-Reply-To: <20160824141537.34836-1-jon.turney@dronecode.org.uk> References: <20160824141537.34836-1-jon.turney@dronecode.org.uk> X-SW-Source: 2016-08/txt/msg00082.txt.bz2 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