diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:07 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-02-19 05:56:07 -0500 |
commit | 319443d42dbed8d6b07b8a2b7a0e565ff5bd8abf (patch) | |
tree | 49e9d2efb1b21b93cc825dbcbb2c906cbe71fa31 /src/base | |
parent | b44e0ce52b894fd4eecc9339e213b7a111c2cc1d (diff) | |
download | gem5-319443d42dbed8d6b07b8a2b7a0e565ff5bd8abf.tar.xz |
scons: Add warning for missing declarations
This patch enables warnings for missing declarations. To avoid issues
with SWIG-generated code, the warning is only applied to non-SWIG
code.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/debug.cc | 3 | ||||
-rw-r--r-- | src/base/debug.hh | 14 | ||||
-rw-r--r-- | src/base/hostinfo.cc | 1 | ||||
-rw-r--r-- | src/base/hostinfo.hh | 2 | ||||
-rw-r--r-- | src/base/inet.hh | 1 | ||||
-rw-r--r-- | src/base/statistics.cc | 2 | ||||
-rw-r--r-- | src/base/statistics.hh | 10 | ||||
-rw-r--r-- | src/base/stats/text.hh | 3 | ||||
-rw-r--r-- | src/base/userinfo.cc | 2 |
9 files changed, 33 insertions, 5 deletions
diff --git a/src/base/debug.cc b/src/base/debug.cc index ba154f377..2780344a4 100644 --- a/src/base/debug.cc +++ b/src/base/debug.cc @@ -33,8 +33,6 @@ #include <algorithm> #include <csignal> -#include <map> -#include <vector> #include "base/cprintf.hh" #include "base/debug.hh" @@ -62,7 +60,6 @@ breakpoint() // // Flags for debugging purposes. Primarily for trace.hh // -typedef std::map<string, Flag *> FlagsMap; int allFlagsVersion = 0; FlagsMap & allFlags() diff --git a/src/base/debug.hh b/src/base/debug.hh index d43117e71..589e8fa42 100644 --- a/src/base/debug.hh +++ b/src/base/debug.hh @@ -32,6 +32,7 @@ #ifndef __BASE_DEBUG_HH__ #define __BASE_DEBUG_HH__ +#include <map> #include <string> #include <vector> @@ -110,6 +111,19 @@ class CompoundFlag : public SimpleFlag void disable(); }; +typedef std::map<std::string, Flag *> FlagsMap; +FlagsMap &allFlags(); + +Flag *findFlag(const std::string &name); + +bool changeFlag(const char *s, bool value); + } // namespace Debug +void setDebugFlag(const char *string); + +void clearDebugFlag(const char *string); + +void dumpDebugFlags(); + #endif // __BASE_DEBUG_HH__ diff --git a/src/base/hostinfo.cc b/src/base/hostinfo.cc index 15413de2a..e5a612c46 100644 --- a/src/base/hostinfo.cc +++ b/src/base/hostinfo.cc @@ -44,6 +44,7 @@ #include <cstring> #include <string> +#include "base/hostinfo.hh" #include "base/misc.hh" #include "base/str.hh" #include "base/types.hh" diff --git a/src/base/hostinfo.hh b/src/base/hostinfo.hh index d9a30481a..137af25af 100644 --- a/src/base/hostinfo.hh +++ b/src/base/hostinfo.hh @@ -35,6 +35,8 @@ #include "base/types.hh" +std::string __get_hostname(); + std::string &hostname(); uint64_t procInfo(const char *filename, const char *target); diff --git a/src/base/inet.hh b/src/base/inet.hh index 1df175c1e..4abac7400 100644 --- a/src/base/inet.hh +++ b/src/base/inet.hh @@ -463,6 +463,7 @@ class UdpPtr int pstart() const { return off() + get()->size(); } }; +uint16_t __tu_cksum(const IpPtr &ip); uint16_t cksum(const UdpPtr &ptr); int hsplit(const EthPacketPtr &ptr); diff --git a/src/base/statistics.cc b/src/base/statistics.cc index 8034625be..630205a59 100644 --- a/src/base/statistics.cc +++ b/src/base/statistics.cc @@ -49,7 +49,6 @@ using namespace std; namespace Stats { std::string Info::separatorString = "::"; -typedef map<const void *, Info *> MapType; // We wrap these in a function to make sure they're built in time. list<Info *> & @@ -114,7 +113,6 @@ StorageParams::~StorageParams() { } -typedef map<std::string, Info *> NameMapType; NameMapType & nameMap() { diff --git a/src/base/statistics.hh b/src/base/statistics.hh index c46eedfde..13347b733 100644 --- a/src/base/statistics.hh +++ b/src/base/statistics.hh @@ -3164,6 +3164,16 @@ void registerDumpCallback(Callback *cb); std::list<Info *> &statsList(); +typedef std::map<const void *, Info *> MapType; +MapType &statsMap(); + +typedef std::map<std::string, Info *> NameMapType; +NameMapType &nameMap(); + +bool validateStatName(const std::string &name); + } // namespace Stats +void debugDumpStats(); + #endif // __BASE_STATISTICS_HH__ diff --git a/src/base/stats/text.hh b/src/base/stats/text.hh index 7f7edaa91..8bb290a99 100644 --- a/src/base/stats/text.hh +++ b/src/base/stats/text.hh @@ -35,6 +35,7 @@ #include <string> #include "base/stats/output.hh" +#include "base/stats/types.hh" #include "base/output.hh" namespace Stats { @@ -75,6 +76,8 @@ class Text : public Output virtual void end(); }; +std::string ValueToString(Result value, int precision); + Output *initText(const std::string &filename, bool desc); } // namespace Stats diff --git a/src/base/userinfo.cc b/src/base/userinfo.cc index 62f7b7b5c..81782012c 100644 --- a/src/base/userinfo.cc +++ b/src/base/userinfo.cc @@ -34,6 +34,8 @@ #include <string> +#include "base/userinfo.hh" + std::string username() { |