From 5c2ed8450ea9cb6a6287ec220ffddc139b974f95 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Fri, 13 Jun 2014 15:46:43 +0200 Subject: [PATCH] Revert my previous fix 28763fa020988ec938dae3d47c10be95c87de90e and suppress gcc false positive warnings. --- Makefile | 2 +- lib/library.cpp | 2 +- tools/dmake.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 011e4abc7..e750f6ac1 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ ifdef COMSPEC endif # COMSPEC ifndef CXXFLAGS - CXXFLAGS=-include lib/cxx11emu.h -pedantic -Wall -Wextra -Wabi -Wcast-qual -Wconversion -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Woverloaded-virtual -Wpacked -Wredundant-decls -Wshadow -Wsign-promo -Wno-sign-compare $(CPPCHK_GLIBCXX_DEBUG) -g + CXXFLAGS=-include lib/cxx11emu.h -pedantic -Wall -Wextra -Wabi -Wcast-qual -Wconversion -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Woverloaded-virtual -Wpacked -Wredundant-decls -Wshadow -Wsign-promo -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare $(CPPCHK_GLIBCXX_DEBUG) -g endif ifeq ($(HAVE_RULES),yes) diff --git a/lib/library.cpp b/lib/library.cpp index 8afe25ab9..15fa7ac0a 100644 --- a/lib/library.cpp +++ b/lib/library.cpp @@ -319,7 +319,7 @@ Library::Error Library::load(const tinyxml2::XMLDocument &doc) const char * const name = node->Attribute("name"); if (!name) return Error(MISSING_ATTRIBUTE, "name"); - PodType podType = {0,0}; + PodType podType = {0}; const char * const size = node->Attribute("sizeof"); if (size) podType.size = atoi(size); diff --git a/tools/dmake.cpp b/tools/dmake.cpp index e1bd09991..bedb5baf4 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -342,6 +342,8 @@ int main(int argc, char **argv) "-Wshadow " // "-Wsign-conversion " "-Wsign-promo " + "-Wno-missing-field-initializers " + "-Wno-missing-braces " // "-Wunreachable-code " "-Wno-sign-compare " // danmar: I don't like this warning, it's very rarelly a bug "$(CPPCHK_GLIBCXX_DEBUG) "