Bug 1198124 - Enable -Wshadow in directories that have no -Wshadow warnings. r=glandium

This commit is contained in:
Chris Peterson 2015-08-25 09:14:38 -07:00
parent efb9437873
commit 40a65bd331
36 changed files with 108 additions and 0 deletions

View File

@ -47,6 +47,9 @@ LOCAL_INCLUDES += [
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')

View File

@ -62,4 +62,7 @@ include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True

View File

@ -21,4 +21,7 @@ LOCAL_INCLUDES += [
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True

View File

@ -75,6 +75,9 @@ if CONFIG['OS_ARCH'] == 'WINNT':
'version',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
JS_PREFERENCE_FILES += [

View File

@ -84,4 +84,7 @@ if CONFIG['HAVE_CLOCK_MONOTONIC']:
JAR_MANIFESTS += ['jar.mn']
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True

View File

@ -25,4 +25,7 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True

View File

@ -51,6 +51,9 @@ EXTRA_PP_JS_MODULES += [
'Webapps.jsm',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -21,6 +21,9 @@ UNIFIED_SOURCES += [
'ArchiveZipFile.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
LOCAL_INCLUDES += [

View File

@ -8,6 +8,9 @@ GeckoCppUnitTests([
'TestWebGLElementArrayCache',
])
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
LOCAL_INCLUDES += [

View File

@ -38,6 +38,9 @@ UNIFIED_SOURCES += [
'PushManager.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
LOCAL_INCLUDES += [

View File

@ -31,6 +31,9 @@ UNIFIED_SOURCES += [
'XMLStylesheetProcessingInstruction.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -9,6 +9,9 @@ UNIFIED_SOURCES += [
'txXMLUtils.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
LOCAL_INCLUDES += [

View File

@ -15,6 +15,9 @@ LOCAL_INCLUDES += [
'/layout/base'
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
# Workaround bug 1142396. Suppress the warning from gmock library for clang.
if CONFIG['CLANG_CXX']:
CXXFLAGS += ['-Wno-null-dereference']

View File

@ -41,6 +41,9 @@ if CONFIG['MOZ_XUL']:
'inDOMView.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -63,4 +63,7 @@ if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin':
# The zone allocator for OSX needs some jemalloc internal functions
LOCAL_INCLUDES += ['/memory/jemalloc/src/include']
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True

View File

@ -42,3 +42,5 @@ LOCAL_INCLUDES += [
'/memory/build',
]
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']

View File

@ -12,3 +12,6 @@ SOURCES += [
SharedLibrary('dummy_replace_malloc')
DISABLE_STL_WRAPPING = True
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']

View File

@ -33,3 +33,6 @@ if CONFIG['_MSC_VER']:
LOCAL_INCLUDES += ['/memory/jemalloc/src/include/msvc_compat/C99']
DISABLE_STL_WRAPPING = True
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']

View File

@ -8,6 +8,9 @@ SOURCES += [
'AppProtocolHandler.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -18,6 +18,9 @@ UNIFIED_SOURCES += [
'nsDeviceProtocolHandler.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')

View File

@ -15,6 +15,9 @@ UNIFIED_SOURCES += [
'nsViewSourceHandler.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -21,6 +21,9 @@ UNIFIED_SOURCES += [
'nsUDPSocketProvider.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -35,4 +35,7 @@ SOURCES += [
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True

View File

@ -12,6 +12,9 @@ SOURCES += [
'mozStorageModule.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -18,6 +18,10 @@ UNIFIED_SOURCES += [
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
with Files('**'):

View File

@ -15,6 +15,9 @@ SOURCES += [
'nsViewManager.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -17,3 +17,6 @@ FINAL_LIBRARY = 'xul'
DEFINES['_IMPL_GTKXTBIN_API'] = True
CFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']

View File

@ -11,3 +11,6 @@ SOURCES += [
FINAL_LIBRARY = 'xul'
CXXFLAGS += CONFIG['TK_CFLAGS']
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']

View File

@ -68,6 +68,9 @@ SOURCES += [
'Omnijar.cpp',
]
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')

View File

@ -39,6 +39,9 @@ UNIFIED_SOURCES += [
'nsNativeModuleLoader.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -43,6 +43,9 @@ LOCAL_INCLUDES += [
# Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
DISABLE_STL_WRAPPING = True
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
# Include fallible for third party code using the xpcom glue

View File

@ -38,6 +38,9 @@ USE_STATIC_LIBS = True
# Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
DISABLE_STL_WRAPPING = True
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
# Include fallible for third party code using the xpcom glue

View File

@ -36,6 +36,9 @@ USE_STATIC_LIBS = True
# Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
DISABLE_STL_WRAPPING = True
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
# Include fallible for third party code using the xpcom glue

View File

@ -123,6 +123,9 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
'CocoaFileUtils.mm',
]
if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')

View File

@ -14,4 +14,7 @@ LOCAL_INCLUDES += [
'../directory',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FAIL_ON_WARNINGS = True

View File

@ -14,6 +14,9 @@ SOURCES += [
'nsWindowDataSource.cpp',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']
FINAL_LIBRARY = 'xul'
FAIL_ON_WARNINGS = True