Bug 1073081 - Fix warnings about macro redefinitions by #undef'ing macros. r=ehsan

--HG--
extra : source : 13df0150da382d9d64f7739a29673509b493ba64
This commit is contained in:
Botond Ballo 2014-12-10 18:26:55 -05:00
parent c06e38f0f8
commit 8f00119c18
4 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include "AutoMounter.h"
#include "VolumeManager.h"
#undef VOLUME_MANAGER_LOG_TAG
#define VOLUME_MANAGER_LOG_TAG "nsVolume"
#include "VolumeManagerLog.h"

View File

@ -30,6 +30,7 @@
#include "mozilla/dom/ContentChild.h"
#include "mozilla/Services.h"
#undef VOLUME_MANAGER_LOG_TAG
#define VOLUME_MANAGER_LOG_TAG "nsVolumeService"
#include "VolumeManagerLog.h"

View File

@ -46,11 +46,13 @@ const int64_t kint64max = (( int64_t) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
#undef DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
// An older, deprecated, politically incorrect name for the above.
#undef DISALLOW_EVIL_CONSTRUCTORS
#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName)
// A macro to disallow all the implicit constructors, namely the
@ -59,6 +61,7 @@ const int64_t kint64max = (( int64_t) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
// This should be used in the private: declarations for a class
// that wants to prevent anyone from instantiating it. This is
// especially useful for classes containing only static methods.
#undef DISALLOW_IMPLICIT_CONSTRUCTORS
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
TypeName(); \
DISALLOW_COPY_AND_ASSIGN(TypeName)

View File

@ -114,6 +114,7 @@ const mozilla::EmptyLog& operator <<(const mozilla::EmptyLog& log, const T&)
#define NOTREACHED() CHROMIUM_LOG(ERROR)
#define NOTIMPLEMENTED() CHROMIUM_LOG(ERROR)
#undef CHECK
#define CHECK(condition) LOG_IF(FATAL, condition)
#define DCHECK_EQ(v1, v2) DCHECK((v1) == (v2))