Bug 1204134 (attempt 2) - Fix and disallow warnings in config/moz.build. r=glandium.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 15 Sep 2015 17:01:08 -0700
changeset 262745 7fedb2bf7fcb2db25ba3bcc27157f0fd5cc28025
parent 262744 faf94ffc0c5ad57c2e4f275e5789f08cf2b33831
child 262746 7c9ca4762c30a1124b36d683f266d51cd2f77d08
push id29381
push userkwierso@gmail.com
push dateWed, 16 Sep 2015 17:53:22 +0000
treeherdermozilla-central@3618c94059d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1204134
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1204134 (attempt 2) - Fix and disallow warnings in config/moz.build. r=glandium.
config/moz.build
config/pathsub.c
config/pathsub.h
--- a/config/moz.build
+++ b/config/moz.build
@@ -38,15 +38,12 @@ PYTHON_UNIT_TESTS += [
     'tests/unit-mozunit.py',
     'tests/unit-nsinstall.py',
     'tests/unit-printprereleasesuffix.py',
 ]
 
 if CONFIG['GNU_CC'] and CONFIG['MOZ_OPTIMIZE']:
     CFLAGS += ['-O3']
 
-# XXX: We should fix these warnings.
-ALLOW_COMPILER_WARNINGS = True
-
 HOST_DEFINES = {
     'UNICODE': True,
     '_UNICODE': True,
 }
--- a/config/pathsub.c
+++ b/config/pathsub.c
@@ -29,17 +29,17 @@
 
 #ifndef D_INO
 #define D_INO	d_ino
 #endif
 
 char *program;
 
 void
-fail(char *format, ...)
+fail(const char *format, ...)
 {
     int error;
     va_list ap;
 
 #ifdef USE_REENTRANT_LIBC
     R_STRERROR_INIT_R();
 #endif
 
@@ -138,17 +138,17 @@ xbasename(char *path)
 
     while ((cp = strrchr(path, '/')) && cp[1] == '\0')
 	*cp = '\0';
     if (!cp) return path;
     return cp + 1;
 }
 
 void
-xchdir(char *dir)
+xchdir(const char *dir)
 {
     if (chdir(dir) < 0)
 	fail("cannot change directory to %s", dir);
 }
 
 int
 relatepaths(char *from, char *to, char *outpath)
 {
--- a/config/pathsub.h
+++ b/config/pathsub.h
@@ -20,23 +20,23 @@
 /*
  * Just prevent stupidity
  */
 #undef NAME_MAX
 #define NAME_MAX 256
 
 extern char *program;
 
-extern void fail(char *format, ...);
+extern void fail(const char *format, ...);
 extern char *getcomponent(char *path, char *name);
 extern char *ino2name(ino_t ino);
 extern void *xmalloc(size_t size);
 extern char *xstrdup(char *s);
 extern char *xbasename(char *path);
-extern void xchdir(char *dir);
+extern void xchdir(const char *dir);
 
 /* Relate absolute pathnames from and to returning the result in outpath. */
 extern int relatepaths(char *from, char *to, char *outpath);
 
 /* XXX changes current working directory -- caveat emptor */
 extern void reversepath(char *inpath, char *name, int len, char *outpath);
 
 #endif /* pathsub_h___ */