1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 07:16:23 -05:00

Fix up some trivial gcc -Wall warnings

Lots more to go.
This commit is contained in:
Linus Torvalds 2005-09-30 23:37:34 -07:00
parent d5dc3160cf
commit d0ed902432
10 changed files with 22 additions and 28 deletions

2
ansi.c
View File

@ -253,7 +253,7 @@ int f, n; /* default flag, numeric argument [unused] */
}
#endif
#else
ansihello()
static void ansihello(void)
{
}
#endif

View File

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

2
edef.h
View File

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

View File

@ -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
posix.c
View File

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

View File

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

1
tcap.c
View File

@ -266,7 +266,6 @@ static void tcapeeop(void)
*/
static void tcaprev(int state)
{
static int revstate = FALSE;
if (state) {
if (SO != NULL)
putpad(SO);

View File

@ -518,7 +518,7 @@ spal()
*
* Nothing returned
***/
hellovms()
static void hellovms(void)
{
}

2
vt52.c
View File

@ -178,7 +178,7 @@ int f, n; /* default flag, numeric argument [unused] */
#endif
#else
vt52hello()
static void vt52hello(void)
{
}

9
word.c
View File

@ -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(&region)) != TRUE)
return (status);