Fixes for warnings related to -Wimplicit-int.
This commit is contained in:
@@ -41,12 +41,12 @@ make sh/main.c
|
||||
make FEATURE/externs implicit
|
||||
make features/externs
|
||||
done features/externs
|
||||
setv mam_libm `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -lm >/dev/null 2>&1 && echo ' -lm'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libjobs `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ljobs >/dev/null 2>&1 && echo ' -ljobs'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libi `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -li >/dev/null 2>&1 && echo ' -li'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libdl `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ldl >/dev/null 2>&1 && echo ' -ldl'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libdld `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ldld >/dev/null 2>&1 && echo ' -ldld'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libintl `(set -; cd /tmp; echo 'main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -lintl >/dev/null 2>&1 && echo ' -lintl'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libm `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -lm >/dev/null 2>&1 && echo ' -lm'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libjobs `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ljobs >/dev/null 2>&1 && echo ' -ljobs'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libi `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -li >/dev/null 2>&1 && echo ' -li'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libdl `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ldl >/dev/null 2>&1 && echo ' -ldl'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libdld `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -ldld >/dev/null 2>&1 && echo ' -ldld'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libintl `(set -; cd /tmp; echo 'int main(){return(0);}' > x.${!-$$}.c; ${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c -lintl >/dev/null 2>&1 && echo ' -lintl'; rm -f x.${!-$$}.[cox])`
|
||||
setv mam_libast ${mam_cc_L+-last}${mam_cc_L-${INSTALLROOT}/lib/libast.a}
|
||||
exec - iffe set cc ${CC} ${ICCFLAGS} ${LDFLAGS} : ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} ${mam_cc_static} ${mam_libm} ${mam_cc_dynamic} ${mam_cc_static} ${mam_libjobs} ${mam_cc_dynamic} ${mam_cc_static} ${mam_libi} ${mam_cc_dynamic} ${mam_libdl} ${mam_libdld} ${mam_cc_static} ${mam_libintl} ${mam_cc_dynamic} ${mam_libast} : run features/externs
|
||||
done FEATURE/externs generated
|
||||
|
||||
@@ -242,7 +242,7 @@ static char *nxtarg __PARAM__((int mt), (mt)) __OTORP__(int mt;){
|
||||
}
|
||||
|
||||
|
||||
static e3 __PARAM__((void), ()){
|
||||
static int e3 __PARAM__((void), ()){
|
||||
char *arg, *cp;
|
||||
int op;
|
||||
char *binop;
|
||||
@@ -419,7 +419,7 @@ int test_unop __PARAM__((int op,const char *arg), (op, arg)) __OTORP__(int op;co
|
||||
}
|
||||
}
|
||||
|
||||
test_binop __PARAM__((int op,const char *left,const char *right), (op, left, right)) __OTORP__(int op;const char *left;const char *right;){
|
||||
int test_binop __PARAM__((int op,const char *left,const char *right), (op, left, right)) __OTORP__(int op;const char *left;const char *right;){
|
||||
double lnum,rnum;
|
||||
if(op&TEST_ARITH)
|
||||
{
|
||||
@@ -484,7 +484,7 @@ static time_t test_time __PARAM__((const char *file1,const char *file2), (file1,
|
||||
* return true if inode of two files are the same
|
||||
*/
|
||||
|
||||
test_inode __PARAM__((const char *file1,const char *file2), (file1, file2)) __OTORP__(const char *file1;const char *file2;){
|
||||
int test_inode __PARAM__((const char *file1,const char *file2), (file1, file2)) __OTORP__(const char *file1;const char *file2;){
|
||||
struct stat stat1,stat2;
|
||||
if(test_stat(file1,&stat1)>=0 && test_stat(file2,&stat2)>=0)
|
||||
if(stat1.st_dev == stat2.st_dev && stat1.st_ino == stat2.st_ino)
|
||||
@@ -498,7 +498,7 @@ test_inode __PARAM__((const char *file1,const char *file2), (file1, file2)) __OT
|
||||
* The static buffer statb is shared with test_mode.
|
||||
*/
|
||||
|
||||
sh_access __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){
|
||||
int sh_access __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){
|
||||
if(*name==0)
|
||||
return(-1);
|
||||
if(strmatch(name,(char*)e_devfdNN))
|
||||
|
||||
@@ -127,7 +127,7 @@ static char *overlay __PARAM__((char *str,const char *newstr), (str, newstr)) __
|
||||
* mode is '=' cause files to be listed in select format
|
||||
*/
|
||||
|
||||
ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, eol, mode)) __OTORP__(char outbuff[];int *cur;int *eol;int mode;){
|
||||
int ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, eol, mode)) __OTORP__(char outbuff[];int *cur;int *eol;int mode;){
|
||||
int offset = staktell();
|
||||
char *staksav = stakptr(0);
|
||||
struct comnod *comptr = (struct comnod*)stakalloc(sizeof(struct comnod));
|
||||
@@ -335,7 +335,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur,
|
||||
* look for edit macro named _i
|
||||
* if found, puts the macro definition into lookahead buffer and returns 1
|
||||
*/
|
||||
ed_macro __PARAM__((int i), (i)) __OTORP__(int i;){
|
||||
int ed_macro __PARAM__((int i), (i)) __OTORP__(int i;){
|
||||
char *out;
|
||||
Namval_t *np;
|
||||
genchar buff[LOOKAHEAD+1];
|
||||
@@ -368,7 +368,7 @@ ed_macro __PARAM__((int i), (i)) __OTORP__(int i;){
|
||||
/*
|
||||
* Enter the fc command on the current history line
|
||||
*/
|
||||
ed_fulledit __PARAM__((void), ()){
|
||||
int ed_fulledit __PARAM__((void), ()){
|
||||
char *cp;
|
||||
if(!sh.hist_ptr)
|
||||
return(-1);
|
||||
|
||||
@@ -274,7 +274,7 @@ void tty_cooked __PARAM__((int fd), (fd)) __OTORP__(int fd;){
|
||||
*
|
||||
}*/
|
||||
|
||||
tty_raw __PARAM__((int fd, int echo), (fd, echo)) __OTORP__(int fd; int echo;){
|
||||
int tty_raw __PARAM__((int fd, int echo), (fd, echo)) __OTORP__(int fd; int echo;){
|
||||
#ifdef L_MASK
|
||||
struct ltchars lchars;
|
||||
#endif /* L_MASK */
|
||||
@@ -431,7 +431,7 @@ tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){
|
||||
# define IEXTEN 0
|
||||
# endif /* IEXTEN */
|
||||
|
||||
tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){
|
||||
int tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){
|
||||
switch(editb.e_raw)
|
||||
{
|
||||
case ECHOMODE:
|
||||
@@ -933,7 +933,7 @@ void ed_putchar __PARAM__((int c), (c)) __OTORP__(int c;){
|
||||
* copy virtual to physical and return the index for cursor in physical buffer
|
||||
*/
|
||||
|
||||
ed_virt_to_phys __PARAM__((genchar *virt,genchar *phys,int cur,int voff,int poff), (virt, phys, cur, voff, poff)) __OTORP__(genchar *virt;genchar *phys;int cur;int voff;int poff;){
|
||||
int ed_virt_to_phys __PARAM__((genchar *virt,genchar *phys,int cur,int voff,int poff), (virt, phys, cur, voff, poff)) __OTORP__(genchar *virt;genchar *phys;int cur;int voff;int poff;){
|
||||
genchar *sp = virt;
|
||||
genchar *dp = phys;
|
||||
int c;
|
||||
@@ -1107,7 +1107,7 @@ int ed_genlen __PARAM__((const genchar *str), (str)) __OTORP__(const genchar *st
|
||||
* returns 1 if string in not in this format, 0 otherwise.
|
||||
*/
|
||||
|
||||
ed_setwidth __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
|
||||
int ed_setwidth __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
|
||||
int indx = 0;
|
||||
int state = 0;
|
||||
int c;
|
||||
|
||||
@@ -189,7 +189,7 @@ static void xcommands __PROTO__((int));
|
||||
static int cr_ok;
|
||||
static Histloc_t location = { -5, 0 };
|
||||
|
||||
ed_emacsread __PARAM__((int fd,char *buff,int scend), (fd, buff, scend)) __OTORP__(int fd;char *buff;int scend;){
|
||||
int ed_emacsread __PARAM__((int fd,char *buff,int scend), (fd, buff, scend)) __OTORP__(int fd;char *buff;int scend;){
|
||||
int c;
|
||||
int i;
|
||||
genchar *out;
|
||||
|
||||
@@ -247,7 +247,7 @@ static int textmod __PROTO__((int,int));
|
||||
*
|
||||
-*/
|
||||
|
||||
ed_viread __PARAM__((int fd, char *shbuf, int nchar), (fd, shbuf, nchar)) __OTORP__(int fd; char *shbuf; int nchar;){
|
||||
int ed_viread __PARAM__((int fd, char *shbuf, int nchar), (fd, shbuf, nchar)) __OTORP__(int fd; char *shbuf; int nchar;){
|
||||
int i; /* general variable */
|
||||
int term_char; /* read() termination character */
|
||||
char prompt[PRSIZE+2]; /* prompt */
|
||||
|
||||
@@ -16,23 +16,23 @@ SHELL=/bin/sh
|
||||
YACCFLAGS=-d
|
||||
mam_libast=$${mam_cc_L+-last}$${mam_cc_L-${PACKAGE_ast_LIB}/libast.a}
|
||||
LPR=lpr
|
||||
mam_libdl=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
mam_libdl=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -ldl \
|
||||
>/dev/null 2>&1 && echo ' -ldl'; rm -f x.$${!-$$$$}.[cox])`
|
||||
mam_libjobs=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
mam_libjobs=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -ljobs \
|
||||
>/dev/null 2>&1 && echo ' -ljobs'; rm -f x.$${!-$$$$}.[cox])`
|
||||
COTEMP=$$$$
|
||||
mam_libintl=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
mam_libintl=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -lintl \
|
||||
>/dev/null 2>&1 && echo ' -lintl'; rm -f x.$${!-$$$$}.[cox])`
|
||||
mam_libi=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
mam_libi=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -li \
|
||||
>/dev/null 2>&1 && echo ' -li'; rm -f x.$${!-$$$$}.[cox])`
|
||||
PACKAGE_ast=${INSTALLROOT}
|
||||
CPP=${CC} -E
|
||||
PR=pr
|
||||
mam_libm=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
mam_libm=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -lm \
|
||||
>/dev/null 2>&1 && echo ' -lm'; rm -f x.$${!-$$$$}.[cox])`
|
||||
INSTALLROOT=../../..
|
||||
@@ -43,7 +43,7 @@ PACKAGE_ast_LIB=${PACKAGE_ast}/lib
|
||||
AR=ar
|
||||
AS=as
|
||||
TAR=tar
|
||||
mam_libdld=`(set -; cd /tmp; echo 'main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
mam_libdld=`(set -; cd /tmp; echo 'int main(){return(0);}' > x.$${!-$$$$}.c; \
|
||||
${CC} ${CCFLAGS} -o x.$${!-$$$$}.x x.$${!-$$$$}.c -ldld \
|
||||
>/dev/null 2>&1 && echo ' -ldld'; rm -f x.$${!-$$$$}.[cox])`
|
||||
CPIO=cpio
|
||||
|
||||
@@ -830,7 +830,7 @@ void sh_iorestore __PARAM__((int last), (last)) __OTORP__(int last;){
|
||||
* returns -1 for failure, 0 for success
|
||||
* <mode> is the same as for access()
|
||||
*/
|
||||
sh_ioaccess __PARAM__((int fd,int mode), (fd, mode)) __OTORP__(int fd;int mode;){
|
||||
int sh_ioaccess __PARAM__((int fd,int mode), (fd, mode)) __OTORP__(int fd;int mode;){
|
||||
int flags;
|
||||
if(mode==X_OK)
|
||||
return(-1);
|
||||
|
||||
@@ -1230,7 +1230,7 @@ done:
|
||||
* disown job if bgflag == 'd'
|
||||
*/
|
||||
|
||||
job_switch __PARAM__((struct process *pw,int bgflag), (pw, bgflag)) __OTORP__(struct process *pw;int bgflag;){
|
||||
int job_switch __PARAM__((struct process *pw,int bgflag), (pw, bgflag)) __OTORP__(struct process *pw;int bgflag;){
|
||||
const char *msg;
|
||||
if(!pw || !(pw=job_byjid((int)pw->p_job)))
|
||||
return(1);
|
||||
|
||||
@@ -140,7 +140,7 @@ static char beenhere = 0;
|
||||
}
|
||||
#endif /* _lib_sigvec */
|
||||
|
||||
main __PARAM__((int ac, char *av[]), (ac, av)) __OTORP__(int ac; char *av[];){
|
||||
int main __PARAM__((int ac, char *av[]), (ac, av)) __OTORP__(int ac; char *av[];){
|
||||
char *name;
|
||||
int fdin;
|
||||
Sfio_t *iop;
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
static const char id[] = "\n@(#)shcomp (AT&T Bell Laboratories) 12/28/93\0\n";
|
||||
static const char header[6] = { CNTL('k'),CNTL('s'),CNTL('h'),0,VERSION,0 };
|
||||
|
||||
main __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
|
||||
int main __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
|
||||
Sfio_t *in, *out;
|
||||
union anynode *t;
|
||||
char *cp;
|
||||
|
||||
@@ -129,7 +129,7 @@ static gid_t rgroupid;
|
||||
static gid_t egroupid;
|
||||
static struct stat statb;
|
||||
|
||||
main __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
|
||||
int main __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
|
||||
int m,n;
|
||||
char *p;
|
||||
struct stat statx;
|
||||
@@ -316,7 +316,7 @@ static void error_exit __PARAM__((const char *message), (message)) __OTORP__(con
|
||||
* This version of access checks against effective uid and effective gid
|
||||
*/
|
||||
|
||||
eaccess __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){
|
||||
int eaccess __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){
|
||||
struct stat statb;
|
||||
if (stat(name, &statb) == 0)
|
||||
{
|
||||
@@ -367,7 +367,7 @@ eaccess __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const ch
|
||||
}
|
||||
|
||||
#ifdef _lib_setreuid
|
||||
setids __PARAM__((int mode,int owner,int group), (mode, owner, group)) __OTORP__(int mode;int owner;int group;){
|
||||
int setids __PARAM__((int mode,int owner,int group), (mode, owner, group)) __OTORP__(int mode;int owner;int group;){
|
||||
if(mode & S_ISGID)
|
||||
setregid(rgroupid,group);
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ static int pipe_exec __PARAM__((int pv[], union anynode *t, int errorflg), (pv,
|
||||
}
|
||||
#endif /* SHOPT_FASTPIPE */
|
||||
|
||||
sh_exec __PARAM__((const union anynode *t, int flags), (t, flags)) __OTORP__(const union anynode *t; int flags;){
|
||||
int sh_exec __PARAM__((const union anynode *t, int flags), (t, flags)) __OTORP__(const union anynode *t; int flags;){
|
||||
sh_sigcheck();
|
||||
if(t && !sh.st.execbrk && !sh_isoption(SH_NOEXEC))
|
||||
{
|
||||
@@ -1220,7 +1220,7 @@ sh_exec __PARAM__((const union anynode *t, int flags), (t, flags)) __OTORP__(con
|
||||
* returns 1 if r == trim(s) otherwise 0
|
||||
*/
|
||||
|
||||
static trim_eq __PARAM__((const char *r,const char *s), (r, s)) __OTORP__(const char *r;const char *s;){
|
||||
static int trim_eq __PARAM__((const char *r,const char *s), (r, s)) __OTORP__(const char *r;const char *s;){
|
||||
char c;
|
||||
while(c = *s++)
|
||||
{
|
||||
|
||||
@@ -402,6 +402,7 @@ nocom __PARAM__((Sfio_t* sp, char* file), (sp, file)) __OTORP__(Sfio_t* sp; char
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
int
|
||||
main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
|
||||
int c;
|
||||
char* s;
|
||||
|
||||
Reference in New Issue
Block a user