summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-03-06 00:33:10 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-03-13 13:58:45 +0100
commita02db58fd50ef7fc2f0284852c6b3f98e458a232 (patch)
treeecb7b4ad3252064381414d39782a2e4222368843 /methods
parent453b82a388013e522b3a1b9fcd6ed0810dab1f4f (diff)
follow method attribute suggestions by gcc
Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
Diffstat (limited to 'methods')
-rw-r--r--methods/ftp.h2
-rw-r--r--methods/http.cc4
-rw-r--r--methods/rsh.h2
-rw-r--r--methods/server.h2
4 files changed, 5 insertions, 5 deletions
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); };