Browse Source

some CXXFLAGS housekeeping

More warnings are always better.

Git-Dch: Ignore
tags/debian/1.1.exp9
David Kalnischkies 6 years ago
parent
commit
c3392a9fcc
5 changed files with 17 additions and 4 deletions
  1. +1
    -1
      apt-pkg/aptconfiguration.h
  2. +8
    -0
      apt-pkg/contrib/sptr.h
  3. +1
    -1
      apt-pkg/edsp.h
  4. +5
    -1
      buildlib/environment.mak.in
  5. +2
    -1
      test/libapt/makefile

+ 1
- 1
apt-pkg/aptconfiguration.h View File

@@ -122,7 +122,7 @@ namespace Configuration { /*{{{*/
/** \return Return a comma-separated list of enabled build profile specifications */
std::string const getBuildProfilesString();
/*}}}*/
};
}
/*}}}*/
}
#endif

+ 8
- 0
apt-pkg/contrib/sptr.h View File

@@ -60,7 +60,15 @@ class SPtrArray
inline SPtrArray(T *Ptr) : Ptr(Ptr) {};
inline SPtrArray() : Ptr(0) {};
#if __GNUC__ >= 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
// gcc warns about this, but we can do nothing here…
#endif
inline ~SPtrArray() {delete [] Ptr;};
#if __GNUC__ >= 4
#pragma GCC diagnostic pop
#endif
};

#endif

+ 1
- 1
apt-pkg/edsp.h View File

@@ -211,6 +211,6 @@ namespace EDSP /*{{{*/
bool ResolveExternal(const char* const solver, pkgDepCache &Cache,
bool const upgrade, bool const distUpgrade,
bool const autoRemove, OpProgress *Progress = NULL);
};
}
/*}}}*/
#endif

+ 5
- 1
buildlib/environment.mak.in View File

@@ -11,7 +11,11 @@ CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT -D_FORTIFY_SOURCE=2
CXX = @CXX@
CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra
CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations
CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef
# suggests methods which already have such an attribute
#CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
# gcc reports currently lots of them at the end of file - unknown reason
CXXFLAGS+= -Wno-deprecated-declarations
# a bit too pedantic to be run by default
#CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros
NUM_PROCS = @NUM_PROCS@


+ 2
- 1
test/libapt/makefile View File

@@ -33,7 +33,7 @@ GTEST_DIR = /usr/src/gtest
# Flags passed to the preprocessor.
# Set Google Test's header directory as a system directory, such that
# the compiler doesn't generate warnings in Google Test headers.
CPPFLAGS += -isystem $(GTEST_DIR)/include
#CPPFLAGS += -isystem $(GTEST_DIR)/include

# Flags passed to the C++ compiler.
CXXFLAGS += -pthread
@@ -41,6 +41,7 @@ CXXFLAGS += -pthread
CXXFLAGS+= -Wno-missing-declarations
CXXFLAGS+= -Wno-missing-field-initializers
CXXFLAGS+= -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wno-suggest-attribute=noreturn
CXXFLAGS+= -Wno-undef

# All Google Test headers. Usually you shouldn't change this definition.
GTEST_HEADERS = /usr/include/gtest/*.h \


Loading…
Cancel
Save