From c378a80204e679062923a5974796ec386b5a330f Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Wed, 25 Nov 2015 10:42:33 +0800 Subject: [PATCH] Recompile with -pedantic. --- Makefile | 2 +- eval.c | 4 ++-- lock.c | 7 +++++++ mingw32.c | 6 ++++++ pklock.c | 5 +++++ termio.c | 4 ++++ 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 21a7489..3e17aa7 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ uname_S := $(shell sh -c 'echo $(uname_S) | sed s/_.*$$//') PROGRAM=ue CC=gcc -WARNINGS=-Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter +WARNINGS=-pedantic -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter CFLAGS=-O2 $(WARNINGS) #CC=c89 +O3 # HP #CFLAGS= -D_HPUX_SOURCE -DSYSV diff --git a/eval.c b/eval.c index 814a031..7c553b6 100644 --- a/eval.c +++ b/eval.c @@ -185,7 +185,7 @@ enum function_type { NILNAMIC = 0, MONAMIC = (1 << 6), DYNAMIC = (2 << 6), - TRINAMIC = (3 << 6), + TRINAMIC = (3 << 6) } ; enum function_code { @@ -195,7 +195,7 @@ enum function_code { UFAND, UFOR, UFLENGTH, UFUPPER, UFLOWER, UFTRUTH, UFASCII, UFCHR, UFGTKEY, UFRND, UFABS, UFSINDEX, UFENV, UFBIND, UFEXIST, UFFIND, UFBAND, UFBOR, - UFBXOR, UFBNOT, UFXLATE, + UFBXOR, UFBNOT, UFXLATE } ; /* List of recognized user functions. */ diff --git a/lock.c b/lock.c index d012ce3..2e7c99b 100644 --- a/lock.c +++ b/lock.c @@ -1,3 +1,5 @@ +/* lock.c -- implements lock.h */ + #include "estruct.h" #include "lock.h" @@ -167,4 +169,9 @@ void lckerror(char *errstr) strcat(obuf, strerror(errno)); mlwrite(obuf); } + +#else +typedef void _pedantic_empty_translation_unit ; #endif + +/* end of lock.c */ diff --git a/mingw32.c b/mingw32.c index 029f67e..4fb92e6 100644 --- a/mingw32.c +++ b/mingw32.c @@ -1,3 +1,5 @@ +/* mingw32.c -- */ + #ifdef MINGW32 #include "termio.h" #include "terminal.h" @@ -188,4 +190,8 @@ static void ttmove( int l, int c) { wgoxy( c, l) ; } +#else +typedef void _pedantic_empty_translation_unit ; #endif + +/* end of mingw32.c */ diff --git a/pklock.c b/pklock.c index 314939a..dd8db5c 100644 --- a/pklock.c +++ b/pklock.c @@ -127,4 +127,9 @@ char *undolock( const char *fname) } return NULL; } + +#else +typedef void _pedantic_empty_translation_unit ; #endif + +/* end of pklock.c */ diff --git a/termio.c b/termio.c index 797232b..dfeef3f 100644 --- a/termio.c +++ b/termio.c @@ -463,4 +463,8 @@ int typahead( void) } #endif +#else +typedef void _pedantic_empty_translation_unit ; #endif /* not POSIX */ + +/* end of termio.c */