From 93b2be7ba23f6c9f1e76919fdf7d3d9a6360acab Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 15 Sep 2015 17:01:08 -0700 Subject: [PATCH] Bug 1204134 (attempt 2) - Fix and disallow warnings in config/moz.build. r=glandium. --- config/moz.build | 3 --- config/pathsub.c | 4 ++-- config/pathsub.h | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/config/moz.build b/config/moz.build index 682626b245c..3421f4b05d1 100644 --- a/config/moz.build +++ b/config/moz.build @@ -43,9 +43,6 @@ PYTHON_UNIT_TESTS += [ 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, diff --git a/config/pathsub.c b/config/pathsub.c index 18a597b2d3b..8a8ea254f53 100644 --- a/config/pathsub.c +++ b/config/pathsub.c @@ -34,7 +34,7 @@ char *program; void -fail(char *format, ...) +fail(const char *format, ...) { int error; va_list ap; @@ -143,7 +143,7 @@ xbasename(char *path) } void -xchdir(char *dir) +xchdir(const char *dir) { if (chdir(dir) < 0) fail("cannot change directory to %s", dir); diff --git a/config/pathsub.h b/config/pathsub.h index adb46032d2d..3cebd0e921f 100644 --- a/config/pathsub.h +++ b/config/pathsub.h @@ -25,13 +25,13 @@ 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);