commands: fixes for clang errors.

This commit is contained in:
Ben Gras 2010-07-06 12:10:23 +00:00
parent 68db8ed0b9
commit e698d818c6
24 changed files with 35 additions and 34 deletions

View file

@ -1196,7 +1196,7 @@ void usage(void)
exit(1);
}
void main(int argc, char **argv)
int main(int argc, char **argv)
{
int i;
char *flags;
@ -1377,4 +1377,5 @@ void main(int argc, char **argv)
}
#endif
exit(ex_code);
return ex_code;
}

View file

@ -55,7 +55,7 @@ _PROTOTYPE(void Sigint , (int));
/****************************************************************/
void main( argc, argv )
int main( argc, argv )
int argc;
char *argv[];

View file

@ -276,7 +276,7 @@ typedef struct de_state /* State of disk ed. */
/* de.c */
_PROTOTYPE(void main , (int argc , char *argv []));
_PROTOTYPE(int main , (int argc , char *argv []));
_PROTOTYPE(int Process , (de_state *s , int c ));
#if __STDC__

View file

@ -157,7 +157,7 @@ _PROTOTYPE(void mahand, (int j ));
_PROTOTYPE(void mjhand, (int j ));
/* dismain.c */
_PROTOTYPE(void main, (int argc, char **argv ));
_PROTOTYPE(int main, (int argc, char **argv ));
/* distabs.c */
_PROTOTYPE(char *getnam, (int k ));

View file

@ -495,11 +495,11 @@ static void disbss()
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void
int
main(argc,argv)
int argc; /* Command-line args from OS */
register char **argv;
char **argv;
{/* * * * * * * * * * * START OF main() * * * * * * * * * * */

View file

@ -16,7 +16,7 @@ void fatal(char *label)
exit(1);
}
void main(int argc, char **argv)
int main(int argc, char **argv)
{
char *device;
int fd;

View file

@ -38,11 +38,10 @@ vfy_data(flag) /* Flag = 0 for quiet check */
int flag;
{
register char *res, *mess;
char *sbe_mvfy(), *sbe_sbvfy(), *sbe_svfy();
if(res = sbe_mvfy(0)) mess = "Mem mgt";
else if(res = sbe_sbvfy(cur_buf,0)) mess = "SBBUF";
else if(res = sbe_svfy(0)) mess = "SD list";
if(res = sbe_mvfy()) mess = "Mem mgt";
else if(res = sbe_sbvfy(cur_buf)) mess = "SBBUF";
else if(res = sbe_svfy()) mess = "SD list";
else return(0); /* Success */
if(flag)

View file

@ -442,6 +442,7 @@ static void pair(T, U, sT, sU)
}
void getsize(int signo);
/* Read everything from termcap */
static void starttcap(term)

View file

@ -38,7 +38,7 @@ main (argc, argv)
# include "vmswild.c"
main (argc, argv)
# else
void main(argc, argv)
int main(argc, argv)
# endif
#endif
int argc;

View file

@ -36,10 +36,10 @@ char *prog_name;
char DHCPCACHE[]=_PATH_DHCPCACHE;
void main _ARGS(( int argc, char *argv[] ));
int main _ARGS(( int argc, char *argv[] ));
void usage _ARGS(( void ));
void main(argc, argv)
int main(argc, argv)
int argc;
char *argv[];
{

View file

@ -42,7 +42,7 @@ char *out_name = "Standard Output"; /* will always point to
name of output file */
char bakfile[60];
void main(argc, argv)
int main(argc, argv)
int argc;
char **argv;
{

View file

@ -7,7 +7,7 @@ _PROTOTYPE( int eqin, (char *s1,char *s2) );
_PROTOTYPE( void set_defaults, (void ) );
_PROTOTYPE( void set_option, (char *arg) );
_PROTOTYPE( void pr_comment, (void ) );
_PROTOTYPE( void main, (int argc,char * *argv) );
_PROTOTYPE( int main, (int argc,char * *argv) );
_PROTOTYPE( void bakcopy, (void ) );
_PROTOTYPE( void dump_line, (void ) );
_PROTOTYPE( int code_target, (void ) );

View file

@ -432,7 +432,7 @@ Usage:\n\
exit(1);
}
void main(int argc, char **argv)
int main(int argc, char **argv)
{
int i= 1;
int mode= -1; /* Mode of target. */

View file

@ -11,7 +11,7 @@
#define MAXFLD 200 /* maximum # of fields to accept */
_PROTOTYPE(void main, (int argc, char **argv));
_PROTOTYPE(int main, (int argc, char **argv));
_PROTOTYPE(void error, (char *s, char *t));
_PROTOTYPE(void usage, (void));
_PROTOTYPE(void match, (void));
@ -58,7 +58,7 @@ char *es; /* s for '-e s' */
char sep; /* c for -tc: filed separator */
char *cmd; /* name of this program */
void main(argc, argv)
int main(argc, argv)
int argc;
char **argv;
{

View file

@ -73,7 +73,7 @@ struct b_pnt {
char cmd[1];
} *b_head, *curpnt;
_PROTOTYPE( void main , (int argc, char *argv[]));
_PROTOTYPE( int main , (int argc, char *argv[]));
FORWARD _PROTOTYPE( void cleanup , (void));
FORWARD _PROTOTYPE( void freepnt , (struct b_pnt *pnt ));
@ -863,7 +863,7 @@ char *s;
longjmp(mainlp, 0);
}
PUBLIC void main(argc, argv)
PUBLIC int main(argc, argv)
int argc;
char *argv[];
{

View file

@ -280,7 +280,7 @@ _PROTOTYPE(char *basename, (char *path ));
_PROTOTYPE(void load_file, (char *file ));
_PROTOTYPE(int get_line, (int fd, char *buffer ));
_PROTOTYPE(LINE *install_line, (char *buffer, int length ));
_PROTOTYPE(void main, (int argc, char *argv []));
_PROTOTYPE(int main, (int argc, char *argv []));
_PROTOTYPE(void RD, (void));
_PROTOTYPE(void I, (void));
_PROTOTYPE(void XT, (void));

View file

@ -1421,7 +1421,7 @@ int length;
return new_line;
}
void main(argc, argv)
int main(argc, argv)
int argc;
char *argv[];
{

View file

@ -17,7 +17,7 @@
#include <sys/ioctl.h>
#include <minix/sound.h>
_PROTOTYPE( void main, (int argc, char **argv));
_PROTOTYPE( int main, (int argc, char **argv));
_PROTOTYPE( void usage, (void));
/******* Wave format definitions *********/
@ -67,7 +67,7 @@ void usage()
}
void main ( int argc, char *argv[] )
int main ( int argc, char *argv[] )
{
int i, r, audio, file;
char *buffer, *file_name;

View file

@ -19,7 +19,7 @@
#include <sys/ioctl.h>
#include <minix/sound.h>
_PROTOTYPE (void main, (int argc, char **argv));
_PROTOTYPE (int main, (int argc, char **argv));
_PROTOTYPE (void usage, (void));
_PROTOTYPE ( void write_wave_header, (void));
_PROTOTYPE ( void terminate, (int s));
@ -124,7 +124,7 @@ void write_wave_header()
}
void main(argc, argv)
int main(argc, argv)
int argc;
char **argv;
{

View file

@ -59,7 +59,7 @@ static char sccsid[] = "@(#)rsh.c 5.24 (Berkeley) 7/1/91";
#include <net/netlib.h>
#include <net/gen/netdb.h>
void main _ARGS(( int argc, char *argv[] ));
int main _ARGS(( int argc, char *argv[] ));
void usage _ARGS(( void ));
char *copyargs _ARGS(( char **argv ));
void sendsig _ARGS(( int signo ));
@ -103,7 +103,7 @@ extern char *krb_realmofhost();
extern int errno;
int rfd2;
void
int
main(argc, argv)
int argc;
char **argv;

View file

@ -63,7 +63,7 @@ long video_base(void)
return bios_crtbase == CRTBASE_MONO ? MONO_BASE : COLOR_BASE;
}
void main(void)
int main(void)
{
static unsigned char screen[MAX_COLS * MAX_ROWS * 2];
unsigned char *ps;

View file

@ -95,7 +95,7 @@ struct winsize winsize;
#define PROTO(a) ()
#endif
void main PROTO(( int argc, char **argv ));
int main PROTO(( int argc, char **argv ));
void report PROTO(( int flags ));
int option PROTO(( char *opt, char *next ));
int match PROTO(( char *s1, char *s2 ));
@ -114,7 +114,7 @@ void set_min_tim PROTO(( int option, char *value ));
#define print_char(c,d,n,a) (do_print_char((unsigned)(c),(unsigned)(d),(n),(a)))
#define print_num(m,d,n,a) (do_print_num((unsigned)(m),(unsigned)(d),(n),(a)))
void main(argc, argv)
int main(argc, argv)
int argc;
char *argv[];
{

View file

@ -20,7 +20,7 @@ void usage(void)
exit(-1);
}
void main(int argc, char **argv)
int main(int argc, char **argv)
{
char termbuf[1024];
char string[256], *pstr;

View file

@ -200,7 +200,7 @@ void print_proc(struct tp *tp, struct mproc *mpr, u32_t tcyc)
pr->p_memmap[D].mem_len) << CLICK_SHIFT)/1024);
printf("%6s", pr->p_rts_flags ? "" : "RUN");
ticks = pr->p_user_time;
printf(" %3d:%02d ", (ticks/system_hz/60), (ticks/system_hz)%60);
printf(" %3ld:%02ld ", (ticks/system_hz/60), (ticks/system_hz)%60);
pcyc = div64u(tp->ticks, SCALE);