diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-06-22 08:50:51 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-06-22 08:50:51 +0000 |
commit | 9855ac52a4d52515ecdfb6e5ddb5a3d7588f920f (patch) | |
tree | 79617037dc40c96c229c8820713e2b3ff5390d46 /Build/source/texk | |
parent | 0f0f3216e5e86665766b196c504d2d1764d30252 (diff) |
enable C compiler warnings (ObjC and C++ not yet)
git-svn-id: svn://tug.org/texlive/trunk@13877 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/getopt.c | 2 | ||||
-rw-r--r-- | Build/source/texk/xdv2pdf/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/xdv2pdf/Makefile.am | 4 | ||||
-rw-r--r-- | Build/source/texk/xdv2pdf/Makefile.in | 3 | ||||
-rw-r--r-- | Build/source/texk/xdv2pdf/xdv2pdf_main.c | 10 |
6 files changed, 26 insertions, 4 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index bdf4b723279..43071eb3504 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,8 @@ +2009-06-22 Peter Breitenlohner <peb@mppmu.mpg.de> + + * getopt.c (_getopt_internal): + explicit braces to avoid ambiguous 'else'. + 2009-06-19 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am: enable compiler warnings. diff --git a/Build/source/texk/kpathsea/getopt.c b/Build/source/texk/kpathsea/getopt.c index d32a4a0415f..a236e88fde8 100644 --- a/Build/source/texk/kpathsea/getopt.c +++ b/Build/source/texk/kpathsea/getopt.c @@ -649,6 +649,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) else { if (opterr) + { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, @@ -659,6 +660,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); + } nextchar += strlen (nextchar); diff --git a/Build/source/texk/xdv2pdf/ChangeLog b/Build/source/texk/xdv2pdf/ChangeLog index fc094da6b99..ee6b827541f 100644 --- a/Build/source/texk/xdv2pdf/ChangeLog +++ b/Build/source/texk/xdv2pdf/ChangeLog @@ -1,3 +1,9 @@ +2009-06-22 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Makefile.am (AM_CFLAGS): enable comfiler warnings for C code + (ObjC and C++ code would give too many warnings). + * xdv2pdf_main.c: ANSI C function declarations. + 2009-05-27 Peter Breitenlohner <peb@mppmu.mpg.de> Adapt to TL2009 build system. diff --git a/Build/source/texk/xdv2pdf/Makefile.am b/Build/source/texk/xdv2pdf/Makefile.am index 08913f129a4..22c58cbc504 100644 --- a/Build/source/texk/xdv2pdf/Makefile.am +++ b/Build/source/texk/xdv2pdf/Makefile.am @@ -7,6 +7,10 @@ ACLOCAL_AMFLAGS = -I ../../m4 INCLUDES = $(KPATHSEA_INCLUDES) AM_CPPFLAGS = +AM_CFLAGS = $(WARNING_CFLAGS) +## Not yet for ObjC and C++ (too many warnings) +AM_OBJCFLAGS = ## $(WARNING_CFLAGS) +AM_CXXFLAGS = ## $(WARNING_CXXFLAGS) if build bin_PROGRAMS = T1Wrap xdv2pdf diff --git a/Build/source/texk/xdv2pdf/Makefile.in b/Build/source/texk/xdv2pdf/Makefile.in index 3887a4a7353..9bd66c84453 100644 --- a/Build/source/texk/xdv2pdf/Makefile.in +++ b/Build/source/texk/xdv2pdf/Makefile.in @@ -261,6 +261,9 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 INCLUDES = $(KPATHSEA_INCLUDES) AM_CPPFLAGS = +AM_CFLAGS = $(WARNING_CFLAGS) +AM_OBJCFLAGS = ## $(WARNING_CFLAGS) +AM_CXXFLAGS = ## $(WARNING_CXXFLAGS) T1Wrap_SOURCES = \ SimplePSInterpreter.h \ SimplePSInterpreter.m \ diff --git a/Build/source/texk/xdv2pdf/xdv2pdf_main.c b/Build/source/texk/xdv2pdf/xdv2pdf_main.c index 17676fb23a3..c7624624b71 100644 --- a/Build/source/texk/xdv2pdf/xdv2pdf_main.c +++ b/Build/source/texk/xdv2pdf/xdv2pdf_main.c @@ -41,7 +41,7 @@ authorization from SIL International. #include <kpathsea/c-fopen.h> #include <kpathsea/c-pathch.h> -#include <kpathsea/c-vararg.h> +#include <stdarg.h> #include <kpathsea/cnf.h> #include <kpathsea/concatn.h> #include <kpathsea/default.h> @@ -100,7 +100,7 @@ extern int xdv2pdf(int argc, char** argv); } static string -remove_dbonly P1C(const_string, path) +remove_dbonly(const_string path) { string ret = XTALLOC(strlen (path) + 1, char), q=ret; const_string p=path; @@ -125,10 +125,13 @@ remove_dbonly P1C(const_string, path) `client_path' member must already be set upon entry. */ static void -init_path PVAR2C(kpse_format_info_type *, info, const_string, default_path, ap) +init_path(kpse_format_info_type *info, const_string default_path, ...) { string env_name; string var = NULL; + va_list ap; + + va_start (ap, default_path); info->default_path = default_path; @@ -191,7 +194,6 @@ init_path PVAR2C(kpse_format_info_type *, info, const_string, default_path, ap) EXPAND_DEFAULT (info->override_path, "application override variable"); info->path = kpse_brace_expand (info->path); } -} /* extra closing brace to match with PVAR2C in function header */ int main(int argc, char** argv) |