From 5e8e9500102800e68c9e7fcac9e85c1668b71a36 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 10 Nov 2009 10:27:09 +0000 Subject: towards TL2010: texk/web2c git-svn-id: svn://tug.org/texlive/trunk@15964 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/tiedir/ChangeLog | 13 ++++++++++++ Build/source/texk/web2c/tiedir/tie-w2c.ch | 35 ++++++++++++++++++++++++------- 2 files changed, 41 insertions(+), 7 deletions(-) (limited to 'Build/source/texk/web2c/tiedir') diff --git a/Build/source/texk/web2c/tiedir/ChangeLog b/Build/source/texk/web2c/tiedir/ChangeLog index 39e87c078c6..a9aa50bfc41 100644 --- a/Build/source/texk/web2c/tiedir/ChangeLog +++ b/Build/source/texk/web2c/tiedir/ChangeLog @@ -1,3 +1,16 @@ +2009-08-29 Peter Breitenlohner + + Avoid maximal compiler warnings. + * tie-w2c.ch (Print the job history): Constify local sting. + +2009-08-28 Peter Breitenlohner + + * ../am/cweb.am (tie_CFLAGS): Enable compiler warnings. + (tie_CPPFLAGS): Use -DNOT_WEB2C, not to import from + ../lib/lib.h globals defined in ../lib/main.c. + * tie-w2c.ch: Declare all functions (except main) as static. + (Print the job history): Silence uninitialized warning. + 2009-06-23 Peter Breitenlohner * tie-w2c.ch: drop P?C, P?H, use ANSI C function declarations. diff --git a/Build/source/texk/web2c/tiedir/tie-w2c.ch b/Build/source/texk/web2c/tiedir/tie-w2c.ch index 4c3d0f61f09..fcf2a987e61 100644 --- a/Build/source/texk/web2c/tiedir/tie-w2c.ch +++ b/Build/source/texk/web2c/tiedir/tie-w2c.ch @@ -42,14 +42,16 @@ typedef char* string; void get_line(i) file_index i; @y -void get_line (file_index i) +static void +get_line (file_index i) @z @x void err_loc(i) /* prints location of error */ int i; @y -void err_loc (int i) /* prints location of error */ +static void +err_loc (int i) /* prints location of error */ @z @x @@ -68,40 +70,46 @@ void err_loc (int i) /* prints location of error */ boolean lines_dont_match(i,j) file_index i,j; @y -boolean lines_dont_match (file_index i, file_index j) +static boolean +lines_dont_match (file_index i, file_index j) @z @x void init_change_file(i,b) file_index i; boolean b; @y -void init_change_file (file_index i, boolean b) +static void +init_change_file (file_index i, boolean b) @z @x void put_line(j) file_index j; @y -void put_line (file_index j) +static void +put_line (file_index j) @z @x boolean e_of_ch_module(i) file_index i; @y -boolean e_of_ch_module (file_index i) +static boolean +e_of_ch_module (file_index i) @z @x boolean e_of_ch_preamble(i) file_index i; @y -boolean e_of_ch_preamble (file_index i) +static boolean +e_of_ch_preamble (file_index i) @z @x void usage() @y +static void usage (void) @z @@ -121,3 +129,16 @@ int main (int argc, string *argv) print_ln(versionstring); /* Web2C version */ print_ln(copyright); /* include the copyright notice */ @z + +@x +{string msg; +@y +{const_string msg; +@z + +@x -- silence unitialized warning + case fatal: msg="That was a fatal error, my friend"; break; +@y + default: /* Anything except spotless, troublesome, or fatal is a bug. */ + case fatal: msg="That was a fatal error, my friend"; break; +@z \ No newline at end of file -- cgit v1.2.3