From cf4ff3b78dc347188949370db914fe6329be6c99 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 27 Feb 2014 01:54:10 +0100 Subject: warning: cast from type A to type B casts away qualifiers [-Wcast-qual] Git-Dch: Ignore Reported-By: gcc -Wcast-qual --- apt-pkg/contrib/hashes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/contrib/hashes.h') diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 0a8bcd259..636cad257 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -77,7 +77,7 @@ class Hashes { return MD5.Add(Data,Size) && SHA1.Add(Data,Size) && SHA256.Add(Data,Size) && SHA512.Add(Data,Size); }; - inline bool Add(const char *Data) {return Add((unsigned char *)Data,strlen(Data));}; + inline bool Add(const char *Data) {return Add((unsigned char const *)Data,strlen(Data));}; inline bool AddFD(int const Fd,unsigned long long Size = 0) { return AddFD(Fd, Size, true, true, true, true); }; bool AddFD(int const Fd, unsigned long long Size, bool const addMD5, -- cgit v1.2.3 From 453b82a388013e522b3a1b9fcd6ed0810dab1f4f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Mar 2014 22:11:25 +0100 Subject: cleanup headers and especially #includes everywhere Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use) --- apt-pkg/contrib/hashes.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'apt-pkg/contrib/hashes.h') diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 636cad257..979ee1eb8 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -17,17 +17,22 @@ #include #include #include -#include -#include -#include #include - +#include #ifndef APT_8_CLEANER_HEADERS using std::min; using std::vector; #endif +#ifndef APT_10_CLEANER_HEADERS +#include +#include +#include +#endif + + +class FileFd; // helper class that contains hash function name // and hash -- cgit v1.2.3 From a02db58fd50ef7fc2f0284852c6b3f98e458a232 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 6 Mar 2014 00:33:10 +0100 Subject: follow method attribute suggestions by gcc Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn} --- apt-pkg/contrib/hashes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/contrib/hashes.h') diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 979ee1eb8..5cd1af03b 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -66,7 +66,7 @@ class HashString bool empty() const; // return the list of hashes we support - static const char** SupportedHashes(); + static APT_CONST const char** SupportedHashes(); }; class Hashes -- cgit v1.2.3