Recompile with -pedantic.

This commit is contained in:
Renaud 2015-11-25 10:42:33 +08:00
parent e3d7efda7f
commit c378a80204
6 changed files with 25 additions and 3 deletions

View File

@ -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

4
eval.c
View File

@ -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. */

7
lock.c
View File

@ -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 */

View File

@ -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 */

View File

@ -127,4 +127,9 @@ char *undolock( const char *fname)
}
return NULL;
}
#else
typedef void _pedantic_empty_translation_unit ;
#endif
/* end of pklock.c */

View File

@ -463,4 +463,8 @@ int typahead( void)
}
#endif
#else
typedef void _pedantic_empty_translation_unit ;
#endif /* not POSIX */
/* end of termio.c */