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.
This commit is contained in:
Andreas Hansson
2013-02-19 05:56:07 -05:00
parent b44e0ce52b
commit 319443d42d
43 changed files with 181 additions and 9 deletions

View File

@@ -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()

View File

@@ -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__

View File

@@ -44,6 +44,7 @@
#include <cstring>
#include <string>
#include "base/hostinfo.hh"
#include "base/misc.hh"
#include "base/str.hh"
#include "base/types.hh"

View File

@@ -35,6 +35,8 @@
#include "base/types.hh"
std::string __get_hostname();
std::string &hostname();
uint64_t procInfo(const char *filename, const char *target);

View File

@@ -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);

View File

@@ -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()
{

View File

@@ -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__

View File

@@ -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

View File

@@ -34,6 +34,8 @@
#include <string>
#include "base/userinfo.hh"
std::string
username()
{