Skip to content

Commit

Permalink
Bug 1198124 - Enable -Wshadow in directories that have no -Wshadow wa…
Browse files Browse the repository at this point in the history
…rnings. r=glandium
  • Loading branch information
cpeterso committed Aug 25, 2015
1 parent 2eaff2c commit 6a40db8
Show file tree
Hide file tree
Showing 36 changed files with 108 additions and 0 deletions.
3 changes: 3 additions & 0 deletions accessible/windows/ia2/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
3 changes: 3 additions & 0 deletions accessible/windows/msaa/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ include('/ipc/chromium/chromium-config.mozbuild')

FINAL_LIBRARY = 'xul'

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True
3 changes: 3 additions & 0 deletions accessible/windows/sdn/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ LOCAL_INCLUDES += [

FINAL_LIBRARY = 'xul'

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True
3 changes: 3 additions & 0 deletions b2g/app/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ if CONFIG['OS_ARCH'] == 'WINNT':
'version',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

JS_PREFERENCE_FILES += [
Expand Down
3 changes: 3 additions & 0 deletions browser/app/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,7 @@ if CONFIG['HAVE_CLOCK_MONOTONIC']:

JAR_MANIFESTS += ['jar.mn']

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True
3 changes: 3 additions & 0 deletions docshell/build/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":

FINAL_LIBRARY = 'xul'

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True
3 changes: 3 additions & 0 deletions dom/apps/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ EXTRA_PP_JS_MODULES += [
'Webapps.jsm',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'xul'
Expand Down
3 changes: 3 additions & 0 deletions dom/archivereader/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ UNIFIED_SOURCES += [
'ArchiveZipFile.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

LOCAL_INCLUDES += [
Expand Down
3 changes: 3 additions & 0 deletions dom/canvas/compiledtest/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ GeckoCppUnitTests([
'TestWebGLElementArrayCache',
])

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

LOCAL_INCLUDES += [
Expand Down
3 changes: 3 additions & 0 deletions dom/push/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ UNIFIED_SOURCES += [
'PushManager.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

LOCAL_INCLUDES += [
Expand Down
3 changes: 3 additions & 0 deletions dom/xml/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ UNIFIED_SOURCES += [
'XMLStylesheetProcessingInstruction.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'xul'
Expand Down
3 changes: 3 additions & 0 deletions dom/xslt/xml/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ UNIFIED_SOURCES += [
'txXMLUtils.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

LOCAL_INCLUDES += [
Expand Down
3 changes: 3 additions & 0 deletions layout/base/gtest/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
3 changes: 3 additions & 0 deletions layout/inspector/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ if CONFIG['MOZ_XUL']:
'inDOMView.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'xul'
Expand Down
3 changes: 3 additions & 0 deletions memory/build/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions memory/mozjemalloc/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ LOCAL_INCLUDES += [
'/memory/build',
]

if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']
3 changes: 3 additions & 0 deletions memory/replace/dummy/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ SOURCES += [
SharedLibrary('dummy_replace_malloc')

DISABLE_STL_WRAPPING = True

if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']
3 changes: 3 additions & 0 deletions memory/replace/jemalloc/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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']
3 changes: 3 additions & 0 deletions netwerk/protocol/app/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ SOURCES += [
'AppProtocolHandler.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'xul'
Expand Down
3 changes: 3 additions & 0 deletions netwerk/protocol/device/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ UNIFIED_SOURCES += [
'nsDeviceProtocolHandler.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

include('/ipc/chromium/chromium-config.mozbuild')
Expand Down
3 changes: 3 additions & 0 deletions netwerk/protocol/viewsource/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ UNIFIED_SOURCES += [
'nsViewSourceHandler.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'xul'
Expand Down
3 changes: 3 additions & 0 deletions netwerk/socket/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ UNIFIED_SOURCES += [
'nsUDPSocketProvider.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'xul'
3 changes: 3 additions & 0 deletions parser/xml/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ SOURCES += [

FINAL_LIBRARY = 'xul'

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True
3 changes: 3 additions & 0 deletions storage/build/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ SOURCES += [
'mozStorageModule.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'xul'
Expand Down
4 changes: 4 additions & 0 deletions toolkit/components/mediasniffer/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ UNIFIED_SOURCES += [

FINAL_LIBRARY = 'xul'

if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

with Files('**'):
Expand Down
3 changes: 3 additions & 0 deletions view/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ SOURCES += [
'nsViewManager.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'xul'
Expand Down
3 changes: 3 additions & 0 deletions widget/gtkxtbin/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ FINAL_LIBRARY = 'xul'
DEFINES['_IMPL_GTKXTBIN_API'] = True

CFLAGS += CONFIG['MOZ_GTK2_CFLAGS']

if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']
3 changes: 3 additions & 0 deletions widget/x11/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ SOURCES += [
FINAL_LIBRARY = 'xul'

CXXFLAGS += CONFIG['TK_CFLAGS']

if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']
3 changes: 3 additions & 0 deletions xpcom/build/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ SOURCES += [
'Omnijar.cpp',
]

if CONFIG['GNU_CC']:
CFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

include('/ipc/chromium/chromium-config.mozbuild')
Expand Down
3 changes: 3 additions & 0 deletions xpcom/components/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ UNIFIED_SOURCES += [
'nsNativeModuleLoader.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'xul'
Expand Down
3 changes: 3 additions & 0 deletions xpcom/glue/standalone/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions xpcom/glue/standalone/staticruntime/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions xpcom/glue/staticruntime/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions xpcom/io/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
3 changes: 3 additions & 0 deletions xpfe/components/build/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ LOCAL_INCLUDES += [
'../directory',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FAIL_ON_WARNINGS = True
3 changes: 3 additions & 0 deletions xpfe/components/windowds/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ SOURCES += [
'nsWindowDataSource.cpp',
]

if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

FINAL_LIBRARY = 'xul'

FAIL_ON_WARNINGS = True

0 comments on commit 6a40db8

Please sign in to comment.