fix remaining warnings in 'make world'

This commit is contained in:
David van Moolenbroek 2009-12-14 20:25:52 +00:00
parent 14367afaf7
commit d1918e2e9f
8 changed files with 12 additions and 17 deletions

View file

@ -122,13 +122,13 @@ void r_stat(Ino_t inum, struct stat *stp)
/* Fetch the block */ /* Fetch the block */
blockbuf = (union fsdata_u *) scratch; blockbuf = (union fsdata_u *) scratch;
readblock(block, blockbuf, block_size); readblock(block, (char *) blockbuf, block_size);
if (super.s_magic == SUPER_V2 || super.s_magic == SUPER_V3) { if (super.s_magic == SUPER_V2 || super.s_magic == SUPER_V3) {
d2_inode *dip; d2_inode *dip;
int i; int i;
dip= &blockbuf->b__v2_ino[ino_offset]; dip= &blockbuf->b__v2_ino[(unsigned int) ino_offset];
curfil.i_mode= dip->d2_mode; curfil.i_mode= dip->d2_mode;
curfil.i_nlinks= dip->d2_nlinks; curfil.i_nlinks= dip->d2_nlinks;
@ -144,7 +144,7 @@ void r_stat(Ino_t inum, struct stat *stp)
d1_inode *dip; d1_inode *dip;
int i; int i;
dip= &blockbuf->b__v1_ino[ino_offset]; dip= &blockbuf->b__v1_ino[(unsigned int) ino_offset];
curfil.i_mode= dip->d1_mode; curfil.i_mode= dip->d1_mode;
curfil.i_nlinks= dip->d1_nlinks; curfil.i_nlinks= dip->d1_nlinks;

View file

@ -636,7 +636,7 @@ static void starttcap(term)
* This function is called once during initialization, and thereafter it is * This function is called once during initialization, and thereafter it is
* called whenever the SIGWINCH signal is sent to this process. * called whenever the SIGWINCH signal is sent to this process.
*/ */
int getsize(signo) void getsize(signo)
int signo; int signo;
{ {
int lines; int lines;
@ -719,8 +719,6 @@ int getsize(signo)
*o_columns = COLS; *o_columns = COLS;
} }
#endif #endif
return 0;
} }

View file

@ -14,7 +14,7 @@
# For MS-DOS, add "-DMS_DOS" to DEFS. See the directory MISC/MSDOS for # For MS-DOS, add "-DMS_DOS" to DEFS. See the directory MISC/MSDOS for
# additional info. # additional info.
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@ -D_POSIX_SOURCE=1
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@ DEFS = @DEFS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@

View file

@ -1491,7 +1491,7 @@ YY_DECL
int doing_codeblock = false; int doing_codeblock = false;
int i; int i;
Char nmdef[MAXLINE], myesc(); Char nmdef[MAXLINE];
#line 1498 "scan.c" #line 1498 "scan.c"
@ -2291,7 +2291,6 @@ YY_RULE_SETUP
#line 435 "scan.l" #line 435 "scan.l"
{ {
register Char *nmdefptr; register Char *nmdefptr;
Char *ndlookup();
strcpy( nmstr, yytext + 1 ); strcpy( nmstr, yytext + 1 );
nmstr[yyleng - 2] = '\0'; /* chop trailing brace */ nmstr[yyleng - 2] = '\0'; /* chop trailing brace */

View file

@ -2,8 +2,12 @@
/* $Header$ */ /* $Header$ */
#include "flexdef.h"
extern int yylex(void); extern int yylex(void);
int main PROTO((int, char**));
int main( argc, argv ) int main( argc, argv )
int argc; int argc;
char *argv[]; char *argv[];

View file

@ -43,6 +43,7 @@ static char flex_version[] = FLEX_VERSION;
/* declare functions that have forward references */ /* declare functions that have forward references */
int main PROTO((int, char**));
void flexinit PROTO((int, char**)); void flexinit PROTO((int, char**));
void readin PROTO((void)); void readin PROTO((void));
void set_up_initial_allocations PROTO((void)); void set_up_initial_allocations PROTO((void));

View file

@ -98,7 +98,7 @@ LEXOPT [aceknopr]
int doing_codeblock = false; int doing_codeblock = false;
int i; int i;
Char nmdef[MAXLINE], myesc(); Char nmdef[MAXLINE];
<INITIAL>{ <INITIAL>{
@ -434,7 +434,6 @@ LEXOPT [aceknopr]
"{"{NAME}"}" { "{"{NAME}"}" {
register Char *nmdefptr; register Char *nmdefptr;
Char *ndlookup();
strcpy( nmstr, yytext + 1 ); strcpy( nmstr, yytext + 1 );
nmstr[yyleng - 2] = '\0'; /* chop trailing brace */ nmstr[yyleng - 2] = '\0'; /* chop trailing brace */

View file

@ -40,8 +40,6 @@ struct hash_entry *ndtbl[NAME_TABLE_HASH_SIZE];
struct hash_entry *sctbl[START_COND_HASH_SIZE]; struct hash_entry *sctbl[START_COND_HASH_SIZE];
struct hash_entry *ccltab[CCL_HASH_SIZE]; struct hash_entry *ccltab[CCL_HASH_SIZE];
struct hash_entry *findsym();
/* addsym - add symbol and definitions to symbol table /* addsym - add symbol and definitions to symbol table
* *
@ -105,7 +103,6 @@ int cclnum;
/* We don't bother checking the return status because we are not /* We don't bother checking the return status because we are not
* called unless the symbol is new. * called unless the symbol is new.
*/ */
Char *copy_unsigned_string();
(void) addsym( (char *) copy_unsigned_string( ccltxt ), (void) addsym( (char *) copy_unsigned_string( ccltxt ),
(char *) 0, cclnum, (char *) 0, cclnum,
@ -179,8 +176,6 @@ void ndinstal( name, definition )
char name[]; char name[];
Char definition[]; Char definition[];
{ {
char *copy_string();
Char *copy_unsigned_string();
if ( addsym( copy_string( name ), if ( addsym( copy_string( name ),
(char *) copy_unsigned_string( definition ), 0, (char *) copy_unsigned_string( definition ), 0,
@ -227,7 +222,6 @@ void scinstal( str, xcluflg )
char str[]; char str[];
int xcluflg; int xcluflg;
{ {
char *copy_string();
/* Generate start condition definition, for use in BEGIN et al. */ /* Generate start condition definition, for use in BEGIN et al. */
action_define( str, lastsc ); action_define( str, lastsc );