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} --- methods/ftp.h | 2 +- methods/http.cc | 4 ++-- methods/rsh.h | 2 +- methods/server.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'methods') diff --git a/methods/ftp.h b/methods/ftp.h index 119d0c7e8..dd92f0086 100644 --- a/methods/ftp.h +++ b/methods/ftp.h @@ -78,7 +78,7 @@ class FtpMethod : public pkgAcqMethod static std::string FailFile; static int FailFd; static time_t FailTime; - static void SigTerm(int); + static APT_NORETURN void SigTerm(int); public: diff --git a/methods/http.cc b/methods/http.cc index 82f16e9b2..ed6e3517d 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -470,7 +470,7 @@ bool HttpServerState::WriteResponse(const std::string &Data) /*{{{*/ return Out.Read(Data); } /*}}}*/ -bool HttpServerState::IsOpen() /*{{{*/ +APT_PURE bool HttpServerState::IsOpen() /*{{{*/ { return (ServerFd != -1); } @@ -485,7 +485,7 @@ bool HttpServerState::InitHashes(FileFd &File) /*{{{*/ return In.Hash->AddFD(File, StartPos); } /*}}}*/ -Hashes * HttpServerState::GetHashes() /*{{{*/ +APT_PURE Hashes * HttpServerState::GetHashes() /*{{{*/ { return In.Hash; } diff --git a/methods/rsh.h b/methods/rsh.h index c2c06acfe..dd259e744 100644 --- a/methods/rsh.h +++ b/methods/rsh.h @@ -64,7 +64,7 @@ class RSHMethod : public pkgAcqMethod static std::string FailFile; static int FailFd; static time_t FailTime; - static void SigTerm(int); + static APT_NORETURN void SigTerm(int); public: diff --git a/methods/server.h b/methods/server.h index d1e151f8a..0f45ab994 100644 --- a/methods/server.h +++ b/methods/server.h @@ -129,7 +129,7 @@ class ServerMethod : public pkgAcqMethod static std::string FailFile; static int FailFd; static time_t FailTime; - static void SigTerm(int); + static APT_NORETURN void SigTerm(int); virtual bool Configuration(std::string Message); virtual bool Flush() { return Server->Flush(File); }; -- cgit v1.2.3