diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 22:56:30 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 22:56:30 +0000 |
commit | 9f58d8bb68966e20fc2809e221d925b895ca762e (patch) | |
tree | aa6885bd03e9c295195779f62d562e9193995df7 | |
parent | 6a6e657234868ad4044b03bdeb9c6f7e872b5ee6 (diff) | |
download | chromium_src-9f58d8bb68966e20fc2809e221d925b895ca762e.zip chromium_src-9f58d8bb68966e20fc2809e221d925b895ca762e.tar.gz chromium_src-9f58d8bb68966e20fc2809e221d925b895ca762e.tar.bz2 |
Turn on -Wall -Werror, fixing a few files while I'm here and *temporarily* disabling some other warnings that take more effort to fix.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1123 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/histogram.h | 2 | ||||
-rw-r--r-- | build/SConscript.main | 10 | ||||
-rw-r--r-- | skia/SConscript | 5 | ||||
-rw-r--r-- | third_party/bsdiff/mbsdiff.cc | 2 | ||||
-rw-r--r-- | third_party/bspatch/SConscript | 4 | ||||
-rw-r--r-- | third_party/libjpeg/SConscript | 4 | ||||
-rw-r--r-- | third_party/libxml/SConscript | 3 |
7 files changed, 25 insertions, 5 deletions
diff --git a/base/histogram.h b/base/histogram.h index 140bdd2..63d734b 100644 --- a/base/histogram.h +++ b/base/histogram.h @@ -350,7 +350,7 @@ class LinearHistogram : public Histogram { public: struct DescriptionPair { Sample sample; - char* description; // Null means end of a list of pairs. + const char* description; // Null means end of a list of pairs. }; LinearHistogram(const wchar_t* name, Sample minimum, Sample maximum, size_t bucket_count); diff --git a/build/SConscript.main b/build/SConscript.main index 7965985..b03ee4a 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -333,9 +333,15 @@ elif env['PLATFORM'] == 'posix': 'webkit', ] + # TODO: fix code that triggers these warnings. + excluded_warnings = [ + '-Wno-unknown-pragmas', # TODO: remove all the Windows-specific #pragmas. + '-Wno-unused-function', # TODO: there's just one Skia function. + '-Wno-switch', # TODO: this is likely masking real bugs. + '-Wno-sign-compare', # TODO: this is likely masking real bugs. + ] env.Replace( - # TODO(linux): we should also compile with -Werror, but not yet. - CCFLAGS = ['-m32', '-g'], + CCFLAGS = ['-m32', '-g', '-Wall', '-Werror'] + excluded_warnings, LINKFLAGS = ['-m32'], # We need pthread for threading, and rt for clock_gettime. LIBS = ['pthread', 'rt'], diff --git a/skia/SConscript b/skia/SConscript index e76aaf9..101e202 100644 --- a/skia/SConscript +++ b/skia/SConscript @@ -61,7 +61,10 @@ if env['PLATFORM'] == 'win32': '/wd4800', ], ) - +elif env['PLATFORM'] == 'posix': + if '-Wall' in env['CCFLAGS']: + # We're not responsible for bad warning hygiene in this third party code. + env['CCFLAGS'].remove('-Wall') input_files = [ 'animator/SkTime.cpp', diff --git a/third_party/bsdiff/mbsdiff.cc b/third_party/bsdiff/mbsdiff.cc index 29227e8..1dcd35e 100644 --- a/third_party/bsdiff/mbsdiff.cc +++ b/third_party/bsdiff/mbsdiff.cc @@ -379,4 +379,4 @@ int main(int argc,char *argv[]) free(newbuf); return 0; -}
\ No newline at end of file +} diff --git a/third_party/bspatch/SConscript b/third_party/bspatch/SConscript index 7f93b68..d7eef03 100644 --- a/third_party/bspatch/SConscript +++ b/third_party/bspatch/SConscript @@ -52,6 +52,10 @@ if env['PLATFORM'] == 'win32': '/wd4800', ], ) +elif env['PLATFORM'] == 'posix': + if '-Wall' in env['CCFLAGS']: + # We're not responsible for bad warning hygiene in this third party code. + env['CCFLAGS'].remove('-Wall') input_files = [ 'mbspatch.cc', diff --git a/third_party/libjpeg/SConscript b/third_party/libjpeg/SConscript index 5c4fce7..f25beb1 100644 --- a/third_party/libjpeg/SConscript +++ b/third_party/libjpeg/SConscript @@ -45,6 +45,10 @@ if env['PLATFORM'] == 'win32': '/wd4800', ], ) +elif env['PLATFORM'] == 'posix': + if '-Wall' in env['CCFLAGS']: + # We're not responsible for bad warning hygiene in this third party code. + env['CCFLAGS'].remove('-Wall') input_files = [ 'jcapimin.c', diff --git a/third_party/libxml/SConscript b/third_party/libxml/SConscript index 40619e3..3a0c00a 100644 --- a/third_party/libxml/SConscript +++ b/third_party/libxml/SConscript @@ -62,6 +62,9 @@ elif env['PLATFORM'] == 'posix': '_REENTRANT', ], ) + if '-Wall' in env['CCFLAGS']: + # We're not responsible for bad warning hygiene in this third party code. + env['CCFLAGS'].remove('-Werror') input_files = [ |