1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-06-03 02:50:42 +00:00

uemacs: enable -Wstrict-prototypes

This patch enables the GCC '-Wstrict-prototypes' switch and fixes up broken
prototypes.

Cc: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Pekka Enberg 2010-02-27 12:38:24 +02:00 committed by Linus Torvalds
parent 3844da04b4
commit 7281ae375e
6 changed files with 8 additions and 6 deletions

View File

@ -27,7 +27,8 @@ HDR=ebind.h edef.h efunc.h epath.h estruct.h evar.h
# DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them # DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them
CC=gcc CC=gcc
CFLAGS=-O2 -Wall WARNINGS=-Wall -Wstrict-prototypes
CFLAGS=-O2 $(WARNINGS)
#CC=c89 +O3 # HP #CC=c89 +O3 # HP
#CFLAGS= -D_HPUX_SOURCE -DSYSV #CFLAGS= -D_HPUX_SOURCE -DSYSV
#CFLAGS=-O4 -DSVR4 # Sun #CFLAGS=-O4 -DSVR4 # Sun

2
edef.h
View File

@ -110,7 +110,7 @@ extern struct buffer *bheadp; /* Head of list of buffers */
extern struct buffer *blistp; /* Buffer for C-X C-B */ extern struct buffer *blistp; /* Buffer for C-X C-B */
extern struct buffer *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */ extern struct buffer *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */
extern window_t *wpopup(); /* Pop up window creation */ extern window_t *wpopup(void); /* Pop up window creation */
extern LINE *lalloc(int); /* Allocate a line */ extern LINE *lalloc(int); /* Allocate a line */
extern char sres[NBUFN]; /* current screen resolution */ extern char sres[NBUFN]; /* current screen resolution */
extern char pat[]; /* Search pattern */ extern char pat[]; /* Search pattern */

2
eval.c
View File

@ -184,6 +184,7 @@ char *gtusr(char *vname)
return (errorm); return (errorm);
} }
extern char *getkill(void);
/* /*
* gtenv() * gtenv()
@ -193,7 +194,6 @@ char *gtusr(char *vname)
char *gtenv(char *vname) char *gtenv(char *vname)
{ {
int vnum; /* ordinal number of var refrenced */ int vnum; /* ordinal number of var refrenced */
char *getkill();
/* scan the list, looking for the referenced name */ /* scan the list, looking for the referenced name */
for (vnum = 0; vnum < NEVARS; vnum++) for (vnum = 0; vnum < NEVARS; vnum++)

View File

@ -33,7 +33,7 @@ static int echo_char(int c, int col);
/* A couple of "own" variables for re-eat */ /* A couple of "own" variables for re-eat */
static int (*saved_get_char) (); /* Get character routine */ static int (*saved_get_char) (void); /* Get character routine */
static int eaten_char = -1; /* Re-eaten char */ static int eaten_char = -1; /* Re-eaten char */
/* A couple more "own" variables for the command string */ /* A couple more "own" variables for the command string */

View File

@ -1368,6 +1368,8 @@ static int mceq(int bc, MC *mt)
return (result); return (result);
} }
extern BITMAP clearbits(void);
/* /*
* cclmake -- create the bitmap for the character class. * cclmake -- create the bitmap for the character class.
* ppatptr is left pointing to the end-of-character-class character, * ppatptr is left pointing to the end-of-character-class character,
@ -1375,7 +1377,6 @@ static int mceq(int bc, MC *mt)
*/ */
static int cclmake(char **ppatptr, MC *mcptr) static int cclmake(char **ppatptr, MC *mcptr)
{ {
BITMAP clearbits();
BITMAP bmap; BITMAP bmap;
char *patptr; char *patptr;
int pchr, ochr; int pchr, ochr;

View File

@ -27,7 +27,7 @@ extern short iochan; /* In "termio.c" */
#include <signal.h> #include <signal.h>
#ifdef SIGWINCH #ifdef SIGWINCH
extern int chg_width, chg_height; extern int chg_width, chg_height;
extern void sizesignal(); extern void sizesignal(int);
#endif #endif
#endif #endif