diff --git a/xpcom/glue/moz.build b/xpcom/glue/moz.build index b07fea4a8932..0b296745023c 100644 --- a/xpcom/glue/moz.build +++ b/xpcom/glue/moz.build @@ -112,3 +112,5 @@ LOCAL_INCLUDES += [ if CONFIG['ENABLE_TESTS']: DIRS += ['tests/gtest'] + +FAIL_ON_WARNINGS = True diff --git a/xpcom/glue/nomozalloc/moz.build b/xpcom/glue/nomozalloc/moz.build index 179ccfa0ed98..d74185497368 100644 --- a/xpcom/glue/nomozalloc/moz.build +++ b/xpcom/glue/nomozalloc/moz.build @@ -40,3 +40,5 @@ USE_STATIC_LIBS = True # Don't use STL wrappers here (i.e. wrapped ); they require mozalloc DISABLE_STL_WRAPPING = True + +FAIL_ON_WARNINGS = True diff --git a/xpcom/glue/pldhash.h b/xpcom/glue/pldhash.h index f5dad9cbdc82..2086ef27e44f 100644 --- a/xpcom/glue/pldhash.h +++ b/xpcom/glue/pldhash.h @@ -184,9 +184,12 @@ private: * |mRecursionLevel| is only used in debug builds, but is present in opt * builds to avoid binary compatibility problems when mixing DEBUG and * non-DEBUG components. (Actually, even if it were removed, - * sizeof(PLDHashTable) wouldn't change, due to struct padding.) + * sizeof(PLDHashTable) wouldn't change, due to struct padding.) Make it + * protected to suppress -Wunused-private-field warnings in opt builds. */ +protected: mutable uint16_t mRecursionLevel;/* used to detect unsafe re-entry */ +private: uint32_t mEntrySize; /* number of bytes in an entry */ uint32_t mEntryCount; /* number of entries in table */ uint32_t mRemovedCount; /* removed entry sentinels in table */ diff --git a/xpcom/glue/standalone/moz.build b/xpcom/glue/standalone/moz.build index 84c9da2fa8d6..9942a3be49f7 100644 --- a/xpcom/glue/standalone/moz.build +++ b/xpcom/glue/standalone/moz.build @@ -42,3 +42,5 @@ LOCAL_INCLUDES += [ # Don't use STL wrappers here (i.e. wrapped ); they require mozalloc DISABLE_STL_WRAPPING = True + +FAIL_ON_WARNINGS = True diff --git a/xpcom/glue/standalone/staticruntime/moz.build b/xpcom/glue/standalone/staticruntime/moz.build index caf310015533..a4c84e56787c 100644 --- a/xpcom/glue/standalone/staticruntime/moz.build +++ b/xpcom/glue/standalone/staticruntime/moz.build @@ -37,3 +37,5 @@ USE_STATIC_LIBS = True # Don't use STL wrappers here (i.e. wrapped ); they require mozalloc DISABLE_STL_WRAPPING = True + +FAIL_ON_WARNINGS = True diff --git a/xpcom/glue/staticruntime/moz.build b/xpcom/glue/staticruntime/moz.build index 33cba07ec67d..86b17efd1b35 100644 --- a/xpcom/glue/staticruntime/moz.build +++ b/xpcom/glue/staticruntime/moz.build @@ -35,3 +35,5 @@ USE_STATIC_LIBS = True # Don't use STL wrappers here (i.e. wrapped ); they require mozalloc DISABLE_STL_WRAPPING = True + +FAIL_ON_WARNINGS = True