diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-30 23:37:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-30 23:37:34 -0700 |
commit | d0ed902432e60671a9b5df62f14c1683ed23a7eb (patch) | |
tree | 7957a5eee5f5ed3708794ba97cad57d3e14ee609 | |
parent | d5dc3160cfa2f2c648f008d7fef1506303b7a1da (diff) | |
download | uemacs-d0ed902432e60671a9b5df62f14c1683ed23a7eb.tar.gz |
Fix up some trivial gcc -Wall warnings
Lots more to go.
-rw-r--r-- | ansi.c | 2 | ||||
-rw-r--r-- | basic.c | 8 | ||||
-rw-r--r-- | edef.h | 2 | ||||
-rw-r--r-- | estruct.h | 2 | ||||
-rw-r--r-- | posix.c | 15 | ||||
-rw-r--r-- | search.c | 7 | ||||
-rw-r--r-- | tcap.c | 1 | ||||
-rw-r--r-- | vmsvt.c | 2 | ||||
-rw-r--r-- | vt52.c | 2 | ||||
-rw-r--r-- | word.c | 9 |
10 files changed, 22 insertions, 28 deletions
@@ -253,7 +253,7 @@ int f, n; /* default flag, numeric argument [unused] */ } #endif #else -ansihello() +static void ansihello(void) { } #endif @@ -243,8 +243,8 @@ int gotobop(int f, int n) #if PKCODE ((justflag == TRUE) || #endif - lgetc(curwp->w_dotp, curwp->w_doto) != TAB && - lgetc(curwp->w_dotp, curwp->w_doto) != ' ') + (lgetc(curwp->w_dotp, curwp->w_doto) != TAB && + lgetc(curwp->w_dotp, curwp->w_doto) != ' ')) #if PKCODE ) #endif @@ -292,8 +292,8 @@ int gotoeop(int f, int n) #if PKCODE ((justflag == TRUE) || #endif - lgetc(curwp->w_dotp, curwp->w_doto) != TAB && - lgetc(curwp->w_dotp, curwp->w_doto) != ' ') + (lgetc(curwp->w_dotp, curwp->w_doto) != TAB && + lgetc(curwp->w_dotp, curwp->w_doto) != ' ')) #if PKCODE ) #endif @@ -135,7 +135,7 @@ WINDOW *wheadp; /* Head of list of windows */ BUFFER *bheadp; /* Head of list of buffers */ BUFFER *blistp; /* Buffer for C-X C-B */ -BUFFER *bfind(); /* Lookup a buffer by name */ +BUFFER *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */ WINDOW *wpopup(); /* Pop up window creation */ LINE *lalloc(); /* Allocate a line */ char sres[NBUFN]; /* current screen resolution */ @@ -687,7 +687,7 @@ typedef struct WHBLOCK { #define EOL 6 #define DITTO 7 #define CLOSURE 256 /* An or-able value. */ -#define MASKCL CLOSURE - 1 +#define MASKCL (CLOSURE - 1) #define MC_ANY '.' /* 'Any' character (except newline). */ #define MC_CCL '[' /* Character class. */ @@ -15,22 +15,23 @@ #include <stdio.h> #include "estruct.h" #include "edef.h" +#include "efunc.h" #include <signal.h> #include <termios.h> #include <fcntl.h> #include <errno.h> -int kbdflgs; /* saved keyboard fd flags */ -int kbdpoll; /* in O_NDELAY mode */ -int kbdqp; /* there is a char in kbdq */ -char kbdq; /* char we've already read */ +static int kbdflgs; /* saved keyboard fd flags */ +static int kbdpoll; /* in O_NDELAY mode */ +static int kbdqp; /* there is a char in kbdq */ +static char kbdq; /* char we've already read */ -struct termios otermios; /* original terminal characteristics */ -struct termios ntermios; /* charactoristics to use inside */ +static struct termios otermios; /* original terminal characteristics */ +static struct termios ntermios; /* charactoristics to use inside */ #define TBUFSIZ 128 -char tobuf[TBUFSIZ]; /* terminal output buffer */ +static char tobuf[TBUFSIZ]; /* terminal output buffer */ /* @@ -442,21 +442,23 @@ static int amatch(MC *mcptr, int direct, LINE **pcwline, int *pcwoff) * notion that the meta-character '$' (and likewise * '^') match positions, not characters. */ - if (mcptr->mc_type == BOL) + if (mcptr->mc_type == BOL) { if (curoff == llength(curline)) { c = nextch(&curline, &curoff, direct ^ REVERSE); goto success; } else return FALSE; + } - if (mcptr->mc_type == EOL) + if (mcptr->mc_type == EOL) { if (curoff == 0) { c = nextch(&curline, &curoff, direct ^ REVERSE); goto success; } else return FALSE; + } /* Neither BOL nor EOL, so go through * the meta-character equal function. @@ -1278,6 +1280,7 @@ static int rmcstr(void) } rmcptr->mc_type = MCNIL; + return status; } /* @@ -266,7 +266,6 @@ static void tcapeeop(void) */ static void tcaprev(int state) { - static int revstate = FALSE; if (state) { if (SO != NULL) putpad(SO); @@ -518,7 +518,7 @@ spal() * * Nothing returned ***/ -hellovms() +static void hellovms(void) { } @@ -178,7 +178,7 @@ int f, n; /* default flag, numeric argument [unused] */ #endif #else -vt52hello() +static void vt52hello(void) { } @@ -653,15 +653,6 @@ int wordcount(int f, int n) int status; /* status return code */ REGION region; /* region to look at */ -#if PKCODE - struct { - long pk_1; - long pk_2; - int pk_3; - int pk_4; - } pk_mlrec; -#endif - /* make sure we have a region to count */ if ((status = getregion(®ion)) != TRUE) return (status); |