Bug 1733034 - Fix unused*-variable warnings due to missing ifdefs. r=andi

dom/base/EventSource.cpp:59:22: error: unused variable 'gEventSourceLog' [-Werror,-Wunused-variable]
static LazyLogModule gEventSourceLog("EventSource");
                     ^
dom/xul/nsXULCommandDispatcher.cpp:35:22: error: unused variable 'gCommandLog' [-Werror,-Wunused-variable]
static LazyLogModule gCommandLog("nsXULCommandDispatcher");
                     ^
layout/generic/ScrollAnchorContainer.cpp:23:31: error: unused variable 'sAnchorLog' [-Werror,-Wunused-variable]
static mozilla::LazyLogModule sAnchorLog("scrollanchor");
                              ^
memory/replace/phc/PHC.cpp:308:15: error: unused variable 'kAllocJunk' [-Werror,-Wunused-const-variable]
const uint8_t kAllocJunk = 0xe4;
              ^

Differential Revision: https://phabricator.services.mozilla.com/D126866
This commit is contained in:
Mike Hommey 2021-09-29 21:44:49 +00:00
parent 9aa0ad981f
commit aec5c5347b
4 changed files with 7 additions and 1 deletions

View File

@ -56,7 +56,9 @@
namespace mozilla::dom {
#ifdef DEBUG
static LazyLogModule gEventSourceLog("EventSource");
#endif
#define SPACE_CHAR (char16_t)0x0020
#define CR_CHAR (char16_t)0x000D

View File

@ -32,7 +32,9 @@ using namespace mozilla;
using mozilla::dom::Document;
using mozilla::dom::Element;
#ifdef DEBUG
static LazyLogModule gCommandLog("nsXULCommandDispatcher");
#endif
////////////////////////////////////////////////////////////////////////

View File

@ -20,9 +20,9 @@
using namespace mozilla::dom;
#ifdef DEBUG
static mozilla::LazyLogModule sAnchorLog("scrollanchor");
#ifdef DEBUG
# define ANCHOR_LOG(fmt, ...) \
MOZ_LOG(sAnchorLog, LogLevel::Debug, \
("ANCHOR(%p, %s, root: %d): " fmt, this, \

View File

@ -317,7 +317,9 @@ static const size_t kAllPagesSize = kNumAllPages * kPageSize;
//
// Also note that, unlike mozjemalloc, PHC doesn't have a poison value for freed
// allocations because freed allocations are protected by OS page protection.
#ifdef DEBUG
const uint8_t kAllocJunk = 0xe4;
#endif
// The maximum time.
static const Time kMaxTime = ~(Time(0));