From e2ea6b63d333e6999d855a026a005726067c38ac Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 30 Oct 2015 16:44:27 +0100 Subject: [PATCH 1/1] reenable gcc warnings for deprecated functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In the meantime the strange warnings disappeared, so we can get back to showing them – and fix the one occurance which creeped in in the meantime. Git-Dch: Ignore --- buildlib/environment.mak.in | 2 -- ftparchive/byhash.cc | 3 +-- ftparchive/byhash.h | 4 +++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in index bf0edb941..51fbc72fb 100644 --- a/buildlib/environment.mak.in +++ b/buildlib/environment.mak.in @@ -14,8 +14,6 @@ CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -W 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 # sanitize options to be enabled for testing #CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr # a bit too pedantic to be run by default diff --git a/ftparchive/byhash.cc b/ftparchive/byhash.cc index 04f8f1629..0a38457c0 100644 --- a/ftparchive/byhash.cc +++ b/ftparchive/byhash.cc @@ -48,9 +48,8 @@ void DeleteAllButMostRecent(std::string dir, int KeepFiles) // Takes a input filename (e.g. binary-i386/Packages) and a hashstring // of the Input data and transforms it into a suitable by-hash filename -std::string GenByHashFilename(std::string Input, HashString h) +std::string GenByHashFilename(std::string ByHashOutputFile, HashString const &h) { - std::string ByHashOutputFile = Input; std::string const ByHash = "/by-hash/" + h.HashType() + "/" + h.HashValue(); size_t trailing_slash = ByHashOutputFile.find_last_of("/"); if (trailing_slash == std::string::npos) diff --git a/ftparchive/byhash.h b/ftparchive/byhash.h index ce05397ad..9fbb479a7 100644 --- a/ftparchive/byhash.h +++ b/ftparchive/byhash.h @@ -11,6 +11,8 @@ #ifndef BYHASH_H #define BYHASH_H +#include + class HashString; // Delete all files in "dir" except for the number specified in "KeepFiles" @@ -18,6 +20,6 @@ class HashString; void DeleteAllButMostRecent(std::string dir, int KeepFiles); // takes a regular input filename -std::string GenByHashFilename(std::string Input, HashString h); +std::string GenByHashFilename(std::string Input, HashString const &h); #endif -- 2.45.2