summaryrefslogtreecommitdiff
path: root/apt-inst
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 /apt-inst
parent453b82a388013e522b3a1b9fcd6ed0810dab1f4f (diff)
downloadapt-a02db58fd50ef7fc2f0284852c6b3f98e458a232.tar.gz
follow method attribute suggestions by gcc
Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
Diffstat (limited to 'apt-inst')
-rw-r--r--apt-inst/extract.cc2
-rw-r--r--apt-inst/filelist.cc6
2 files changed, 4 insertions, 4 deletions
diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc
index b2956d91d..b60784450 100644
--- a/apt-inst/extract.cc
+++ b/apt-inst/extract.cc
@@ -260,7 +260,7 @@ bool pkgExtract::DoItem(Item &Itm, int &/*Fd*/)
// Extract::Finished - Sequence finished, erase the temp files /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgExtract::Finished()
+APT_CONST bool pkgExtract::Finished()
{
return true;
}
diff --git a/apt-inst/filelist.cc b/apt-inst/filelist.cc
index b4a4f3d9d..4dbc4a2d7 100644
--- a/apt-inst/filelist.cc
+++ b/apt-inst/filelist.cc
@@ -85,7 +85,7 @@ pkgFLCache::Header::Header()
// FLCache::Header::CheckSizes - Check if the two headers have same *sz /*{{{*/
// ---------------------------------------------------------------------
/* Compare to make sure we are matching versions */
-bool pkgFLCache::Header::CheckSizes(Header &Against) const
+APT_PURE bool pkgFLCache::Header::CheckSizes(Header &Against) const
{
if (HeaderSz == Against.HeaderSz &&
NodeSz == Against.NodeSz &&
@@ -353,7 +353,7 @@ pkgFLCache::NodeIterator pkgFLCache::GetNode(const char *Name,
// ---------------------------------------------------------------------
/* This is one of two hashing functions. The other is inlined into the
GetNode routine. */
-pkgFLCache::Node *pkgFLCache::HashNode(NodeIterator const &Nde)
+APT_PURE pkgFLCache::Node *pkgFLCache::HashNode(NodeIterator const &Nde)
{
// Hash the node
unsigned long HashPos = 0;
@@ -570,7 +570,7 @@ bool pkgFLCache::AddConfFile(const char *Name,const char *NameEnd,
// ---------------------------------------------------------------------
/* Since the package pointer is indirected in all sorts of interesting ways
this is used to get a pointer to the owning package */
-pkgFLCache::Package *pkgFLCache::NodeIterator::RealPackage() const
+APT_PURE pkgFLCache::Package *pkgFLCache::NodeIterator::RealPackage() const
{
if (Nde->Pointer == 0)
return 0;