summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--apt-pkg/deb/deblistparser.h2
-rw-r--r--test/libapt/CMakeLists.txt2
3 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a06da34f..1e90b3a91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,7 +71,8 @@ add_optional_compile_options(Wnoexcept)
add_optional_compile_options(Wsign-promo)
add_optional_compile_options(Wundef)
add_optional_compile_options(Wdouble-promotion)
-
+add_optional_compile_options(Wsuggest-override)
+add_optional_compile_options(Werror=suggest-override)
# apt-ftparchive dependencies
find_package(BerkeleyDB REQUIRED)
if (BERKELEY_DB_FOUND)
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index ad2b947fe..8143f855f 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -152,7 +152,7 @@ class APT_HIDDEN debTranslationsParser : public debListParser
class APT_HIDDEN debStatusListParser : public debListParser
{
public:
- virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
+ virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) APT_OVERRIDE;
explicit debStatusListParser(FileFd *File)
: debListParser(File) {};
};
diff --git a/test/libapt/CMakeLists.txt b/test/libapt/CMakeLists.txt
index 57ef5ac3f..d44d77ad4 100644
--- a/test/libapt/CMakeLists.txt
+++ b/test/libapt/CMakeLists.txt
@@ -27,6 +27,8 @@ if(GTEST_FOUND)
# so disable the offending warnings while compiling tests for now
add_optional_compile_options(Wno-undef)
add_optional_compile_options(Wno-ctor-dtor-privacy)
+ # Do not force override for gtest, gtest is missing override specifiers
+ add_optional_compile_options(Wno-suggest-override)
# Definition of the C++ files used to build the test binary - note that this
# is expanded at CMake time, so you have to rerun cmake if you add or remove