From: Kees van Reeuwijk Date: Tue, 6 Jul 2010 11:29:23 +0000 (+0000) Subject: Repair errors and warnings flagged by llvm. X-Git-Tag: v3.1.8~279 X-Git-Url: http://zhaoyanbai.com/repos/doc/roff.7.html?a=commitdiff_plain;h=0cfdb11450f43b1a8bb8be391521e8aa466a0711;p=minix.git Repair errors and warnings flagged by llvm. --- diff --git a/boot/boot.c b/boot/boot.c index ac42670a6..2201e61bc 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -1962,7 +1962,7 @@ void boot(void) #if UNIX -void main(int argc, char **argv) +int main(int argc, char **argv) /* Do not load or start anything, just edit parameters. */ { int i; @@ -2034,6 +2034,7 @@ void main(int argc, char **argv) monitor(); } exit(0); + return 0; } reset() { } diff --git a/boot/bootimage.c b/boot/bootimage.c index 3638199b1..f2274176d 100644 --- a/boot/bootimage.c +++ b/boot/bootimage.c @@ -534,7 +534,7 @@ void exec_image(char *image) /* Save a copy of the header for the kernel, with a_syms * misused as the address where the process is loaded at. */ - DEBUGEXTRA(("raw_copy(0x%x, 0x%lx, 0x%x)... ", + DEBUGEXTRA(("raw_copy(0x%lx, 0x%lx, 0x%x)... ", aout + i * A_MINHDR, mon2abs(&hdr.process), A_MINHDR)); hdr.process.a_syms= addr; raw_copy(aout + i * A_MINHDR, mon2abs(&hdr.process), A_MINHDR); @@ -653,7 +653,7 @@ void exec_image(char *image) } if (verboseboot < VERBOSEBOOT_BASIC) - printf("(%dk)\n", totalmem/1024); + printf("(%luk)\n", totalmem/1024); if ((n_procs= i) == 0) { printf("There are no programs in %s\n", image); @@ -842,7 +842,7 @@ void bootminix(void) printf("Not enough memory to load %s\n", image); break; case EIO: - printf("Unsuspected EOF on %s\n", image); + printf("Unexpected EOF on %s\n", image); case 0: /* No error or error already reported. */; } diff --git a/drivers/printer/printer.c b/drivers/printer/printer.c index 905406ac0..7d02e0ec9 100644 --- a/drivers/printer/printer.c +++ b/drivers/printer/printer.c @@ -124,7 +124,7 @@ PUBLIC int is_status_msg_expected = FALSE; /*===========================================================================* * printer_task * *===========================================================================*/ -PUBLIC void main(void) +PUBLIC int main(int argc, char *argv[]) { /* Main routine of the printer task. */ message pr_mess; /* buffer for all incoming messages */ diff --git a/drivers/sb16/dsp/sb16_dsp.c b/drivers/sb16/dsp/sb16_dsp.c index 052c28bba..dbc98c163 100644 --- a/drivers/sb16/dsp/sb16_dsp.c +++ b/drivers/sb16/dsp/sb16_dsp.c @@ -28,7 +28,6 @@ #include "sb16.h" -_PROTOTYPE(void main, (void)); FORWARD _PROTOTYPE( int dsp_open, (void) ); FORWARD _PROTOTYPE( int dsp_close, (void) ); FORWARD _PROTOTYPE( int dsp_ioctl, (const message *m_ptr) ); @@ -88,7 +87,7 @@ PUBLIC int is_status_msg_expected = FALSE; /*===========================================================================* * main *===========================================================================*/ -PUBLIC void main() +PUBLIC int main(int argc, char *argv[]) { int r; endpoint_t caller; diff --git a/drivers/sb16/mixer/sb16_mixer.c b/drivers/sb16/mixer/sb16_mixer.c index d12024cff..c721a4c38 100644 --- a/drivers/sb16/mixer/sb16_mixer.c +++ b/drivers/sb16/mixer/sb16_mixer.c @@ -24,7 +24,6 @@ #include "sb16.h" -_PROTOTYPE(void main, (void)); FORWARD _PROTOTYPE( int mixer_init, (void)); FORWARD _PROTOTYPE( int mixer_open, (const message *m_ptr)); FORWARD _PROTOTYPE( int mixer_close, (const message *m_ptr)); @@ -47,7 +46,8 @@ FORWARD _PROTOTYPE( int sef_cb_init_fresh, (int type, sef_init_info_t *info) ); /*===========================================================================* * main *===========================================================================*/ -PUBLIC void main() { +PUBLIC int main(int argc, char *argv[]) +{ message mess; int ipc_status; int err, caller, proc_nr; diff --git a/kernel/main.c b/kernel/main.c index a5801bda3..ab7f4ed04 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -26,7 +26,7 @@ FORWARD _PROTOTYPE( void announce, (void)); /*===========================================================================* * main * *===========================================================================*/ -PUBLIC void main(void) +PUBLIC int main(int argc, char *argv[]) { /* Start the ball rolling. */ struct boot_image *ip; /* boot image pointer */ @@ -260,6 +260,7 @@ PUBLIC void main(void) switch_to_user(); NOT_REACHABLE; + return 1; } /*===========================================================================* diff --git a/test/select/speed.c b/test/select/speed.c index 889d3a4c8..46956b181 100644 --- a/test/select/speed.c +++ b/test/select/speed.c @@ -24,7 +24,8 @@ #define NUMBER 12 -void main(void) { +int main(int argc, char *argv[]) +{ char *udp_device; int fd[NUMBER]; fd_set fds_write; @@ -56,4 +57,5 @@ void main(void) { for (i = 0; i < NUMBER; i++) { close(fd[i]); } + return 0; } diff --git a/test/select/test02.c b/test/select/test02.c index 93a2b2364..338565734 100644 --- a/test/select/test02.c +++ b/test/select/test02.c @@ -29,7 +29,8 @@ void dump_fdset(fd_set *set) { printf("\n"); } -void main(void) { +int main(int argc, char *argv[]) +{ int fd1, fd2, fd3, fd4, fd5, fd6; /* file descriptors of files */ fd_set fds_read, fds_write; int retval; @@ -109,4 +110,5 @@ void main(void) { unlink("dummy4.txt"); unlink("dummy5.txt"); unlink("dummy6.txt"); + return 0; } diff --git a/test/select/test03.c b/test/select/test03.c index fcbb96556..14e2eba8d 100644 --- a/test/select/test03.c +++ b/test/select/test03.c @@ -1,5 +1,5 @@ /* - * Test name: test02.c + * Test name: test03.c * * Objetive: The purpose of this test is to make sure that select works * when working with files. @@ -28,7 +28,8 @@ void dump_fdset(fd_set *set) { printf("\n"); } -void main(void) { +int main(int argc, char *argv[]) +{ int fd1, fd2, fd3, fd4, fd5, fd6; /* file descriptors of files */ fd_set fds_read, fds_write; /* bit maps */ struct timeval timeout; /* timeout */ @@ -132,4 +133,5 @@ void main(void) { unlink("dummy4.txt"); unlink("dummy5.txt"); unlink("dummy6.txt"); + return 0; } diff --git a/test/select/test10.c b/test/select/test10.c index 3f44d829c..6f68c8490 100644 --- a/test/select/test10.c +++ b/test/select/test10.c @@ -22,7 +22,8 @@ #include #include -void main(void) { +int main(int argc, char *argv[]) +{ fd_set fds_read, fds_write; int retval; char data[1024]; @@ -66,4 +67,5 @@ void main(void) { } printf("Data: %s\n", data); } + return 1; } diff --git a/test/select/test11.c b/test/select/test11.c index 5126f60cd..99c8381b8 100644 --- a/test/select/test11.c +++ b/test/select/test11.c @@ -137,7 +137,8 @@ void do_parent(int data_pipe[]) exit(0); } -void main(void) { +int main(int argc, char *argv[]) +{ int pipes[2]; int retval; int pid; @@ -159,4 +160,5 @@ void main(void) { do_child(pipes); else do_parent(pipes); + return 0; } diff --git a/test/test17.c b/test/test17.c index df0afd915..8eb011882 100644 --- a/test/test17.c +++ b/test/test17.c @@ -750,13 +750,12 @@ char *string; void nlcr() { - printf("\n"); + fputs("\n",stdout); } -void str(s) -char *s; +void str(char *s) { - printf(s); + fputs(s,stdout); } /***************************************************************************** diff --git a/test/test18.c b/test/test18.c index 17fbf4aa0..e59e51dc4 100644 --- a/test/test18.c +++ b/test/test18.c @@ -999,13 +999,12 @@ char *string; void nlcr() { - printf("\n"); + fputs("\n",stdout); } -void str(s) -char *s; +void str(char *s) { - printf(s); + fputs(s,stdout); } /***************************************************************************** diff --git a/test/test20.c b/test/test20.c index 3fb628402..68b2aaf04 100644 --- a/test/test20.c +++ b/test/test20.c @@ -35,7 +35,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test20a, (void)); _PROTOTYPE(void test20b, (void)); _PROTOTYPE(void test20c, (void)); @@ -47,9 +46,7 @@ _PROTOTYPE(void quit, (void)); char executable[1024]; -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; diff --git a/test/test22.c b/test/test22.c index 1c5d00a68..20249ac2b 100644 --- a/test/test22.c +++ b/test/test22.c @@ -19,16 +19,13 @@ int errct = 0; /* Total error counter. */ int subtest = 1; -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test22a, (void)); _PROTOTYPE(int mode, (char *filename)); _PROTOTYPE(int umode, (char *filename)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; diff --git a/test/test23.c b/test/test23.c index 2a1dceeb6..05c5bfdb3 100644 --- a/test/test23.c +++ b/test/test23.c @@ -29,7 +29,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test23a, (void)); _PROTOTYPE(void test23b, (void)); _PROTOTYPE(void test23c, (void)); @@ -39,9 +38,7 @@ _PROTOTYPE(char *my_getcwd, (char *buf, int size)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -61,6 +58,7 @@ char *argv[]; } quit(); + return 1; } void test23a() diff --git a/test/test24.c b/test/test24.c index a821bf8b6..411b80990 100644 --- a/test/test24.c +++ b/test/test24.c @@ -13,7 +13,6 @@ #include #include -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void chk_dir, (DIR * dirpntr)); _PROTOTYPE(void test24a, (void)); _PROTOTYPE(void test24b, (void)); @@ -39,9 +38,7 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; diff --git a/test/test25.c b/test/test25.c index a05943030..2bd7c39c9 100644 --- a/test/test25.c +++ b/test/test25.c @@ -33,7 +33,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test25a, (void)); _PROTOTYPE(void test25b, (void)); _PROTOTYPE(void test25c, (void)); @@ -43,9 +42,7 @@ _PROTOTYPE(void makelongnames, (void)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { char buffer[PATH_MAX + 1]; int i, m = 0xFFFF; @@ -77,6 +74,7 @@ char *argv[]; if (m & 020) test25e(); } quit(); + return 1; } void test25a() diff --git a/test/test26.c b/test/test26.c index 729041732..998e9e9af 100644 --- a/test/test26.c +++ b/test/test26.c @@ -27,16 +27,13 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test26a, (void)); _PROTOTYPE(void test26b, (void)); _PROTOTYPE(void test26c, (void)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; diff --git a/test/test27.c b/test/test27.c index 491f6b7ff..a7659cc4e 100644 --- a/test/test27.c +++ b/test/test27.c @@ -27,7 +27,6 @@ char MaxPath[PATH_MAX]; char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test27a, (void)); _PROTOTYPE(void test27b, (void)); _PROTOTYPE(void test27c, (void)); @@ -35,9 +34,7 @@ _PROTOTYPE(void makelongnames, (void)); _PROTOTYPE(void e, (int __n)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; diff --git a/test/test28.c b/test/test28.c index 223726c84..46b2ddecd 100644 --- a/test/test28.c +++ b/test/test28.c @@ -36,7 +36,6 @@ char MaxPath[PATH_MAX]; char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test28a, (void)); _PROTOTYPE(void test28c, (void)); _PROTOTYPE(void test28b, (void)); @@ -44,9 +43,7 @@ _PROTOTYPE(void makelongnames, (void)); _PROTOTYPE(void e, (int n)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -67,6 +64,7 @@ char *argv[]; if (m & 0004) test28c(); } quit(); + return 1; } void test28a() diff --git a/test/test29.c b/test/test29.c index 64da56056..5e209e1b7 100644 --- a/test/test29.c +++ b/test/test29.c @@ -42,16 +42,13 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test29a, (void)); _PROTOTYPE(void test29b, (void)); _PROTOTYPE(void test29c, (void)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; diff --git a/test/test30.c b/test/test30.c index 879ce77ab..586197c8e 100644 --- a/test/test30.c +++ b/test/test30.c @@ -34,7 +34,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test30a, (void)); _PROTOTYPE(void test30b, (void)); _PROTOTYPE(void test30c, (void)); @@ -42,9 +41,7 @@ _PROTOTYPE(void makelongnames, (void)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -118,7 +115,7 @@ void test30a() if (st.st_gid != getegid()) e(10); #endif /* defined(NGROUPS_MAX) && NGROUPS_MAX == 0 */ if (!S_ISREG(st.st_mode)) e(11); - if (st.st_mode & 0777 != 0644) e(12); + if ((st.st_mode & 0777) != 0644) e(12); if (st.st_nlink != 1) e(13); if (st.st_ctime != time1) e(14); /* All time fields should be updated */ if (st.st_atime != time1) e(15); diff --git a/test/test31.c b/test/test31.c index 3acf7275a..412bfe7ea 100644 --- a/test/test31.c +++ b/test/test31.c @@ -27,7 +27,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test31a, (void)); _PROTOTYPE(void test31b, (void)); _PROTOTYPE(void test31c, (void)); @@ -35,9 +34,7 @@ _PROTOTYPE(void makelongnames, (void)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -58,6 +55,7 @@ char *argv[]; if (m & 0004) test31c(); } quit(); + return 1; } void test31a() @@ -96,7 +94,7 @@ void test31a() if (st.st_gid != getegid()) e(4); #endif /* defined(NGROUPS_MAX) && NGROUPS_MAX == 0 */ if (!S_ISFIFO(st.st_mode)) e(5); - if (st.st_mode & 0777 != 0644) e(6); + if ((st.st_mode & 0777) != 0644) e(6); if (st.st_nlink != 1) e(7); if (st.st_ctime != time1) e(8); if (st.st_atime != time1) e(9); diff --git a/test/test32.c b/test/test32.c index 23bd89534..c04b0ca6a 100644 --- a/test/test32.c +++ b/test/test32.c @@ -28,7 +28,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test32a, (void)); _PROTOTYPE(void test32b, (void)); _PROTOTYPE(void test32c, (void)); @@ -36,9 +35,7 @@ _PROTOTYPE(void makelongnames, (void)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -57,6 +54,7 @@ char *argv[]; if (m & 0004) test32c(); } quit(); + return 1; } #define BUF_SIZE 1024 diff --git a/test/test33.c b/test/test33.c index 841bed64f..3ed79bf60 100644 --- a/test/test33.c +++ b/test/test33.c @@ -29,7 +29,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test33a, (void)); _PROTOTYPE(void test33b, (void)); _PROTOTYPE(void test33c, (void)); @@ -39,9 +38,7 @@ _PROTOTYPE(void makelongnames, (void)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -72,6 +69,7 @@ char *argv[]; if (m & 0010) test33d(); } quit(); + return 1; } void test33a() diff --git a/test/test34.c b/test/test34.c index d1f7f386a..1948573e3 100644 --- a/test/test34.c +++ b/test/test34.c @@ -46,7 +46,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char NameTooLong[NAME_MAX + 2]; /* Name of maximum +1 length */ char PathTooLong[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test34a, (void)); _PROTOTYPE(void test34b, (void)); _PROTOTYPE(void test34c, (void)); @@ -56,9 +55,7 @@ _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); _PROTOTYPE(void getids, (uid_t * uid, gid_t * gid)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; diff --git a/test/test35.c b/test/test35.c index 94cd13ec1..5bb151ae0 100644 --- a/test/test35.c +++ b/test/test35.c @@ -39,7 +39,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char NameTooLong[NAME_MAX + 2]; /* Name of maximum +1 length */ char PathTooLong[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test35a, (void)); _PROTOTYPE(void test35b, (void)); _PROTOTYPE(void test35c, (void)); @@ -48,9 +47,7 @@ _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); _PROTOTYPE(void getids, (uid_t * uid, gid_t * gid)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -79,6 +76,7 @@ char *argv[]; if (m & 0004) test35c(); } quit(); + return 1; } void test35a() diff --git a/test/test36.c b/test/test36.c index 1d820539c..40163c050 100644 --- a/test/test36.c +++ b/test/test36.c @@ -27,7 +27,6 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test36a, (void)); _PROTOTYPE(void test36b, (void)); _PROTOTYPE(void test36c, (void)); @@ -61,9 +60,7 @@ char *testfiles[] = { NULL }; -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -83,6 +80,7 @@ char *argv[]; if (m & 0010) test36d(); } quit(); + return 1; } void test36a() diff --git a/test/test38.c b/test/test38.c index 66ddf79ea..d3eae8ec3 100644 --- a/test/test38.c +++ b/test/test38.c @@ -31,7 +31,6 @@ int subtest = 1; int superuser; int signumber = 0; -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test38a, (void)); _PROTOTYPE(void test38b, (void)); _PROTOTYPE(void test38c, (void)); @@ -39,9 +38,7 @@ _PROTOTYPE(void setsignumber, (int _signumber)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -60,6 +57,7 @@ char *argv[]; if (m & 0004) test38c(); } quit(); + return 1; } void test38a() diff --git a/test/test53.c b/test/test53.c index e2d57b5de..aea34051a 100644 --- a/test/test53.c +++ b/test/test53.c @@ -12,7 +12,7 @@ #define TIMED 0 static volatile int errct; -static volatile expect_SIGFPE; +static volatile int expect_SIGFPE; static u64_t i, j, k; static jmp_buf jmpbuf_SIGFPE, jmpbuf_main; diff --git a/test/test8.c b/test/test8.c index 9eb215f20..0ddd7295f 100644 --- a/test/test8.c +++ b/test/test8.c @@ -25,15 +25,12 @@ char MaxPath[PATH_MAX]; /* Same for path */ char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */ char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */ -_PROTOTYPE(void main, (int argc, char *argv[])); _PROTOTYPE(void test8a, (void)); _PROTOTYPE(void test8b, (void)); _PROTOTYPE(void e, (int number)); _PROTOTYPE(void quit, (void)); -void main(argc, argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { int i, m = 0xFFFF; @@ -47,6 +44,7 @@ char *argv[]; if (m & 0002) test8b(); } quit(); + return 1; } void test8a() diff --git a/test/test9.c b/test/test9.c index 2e63c989e..932825590 100644 --- a/test/test9.c +++ b/test/test9.c @@ -64,7 +64,7 @@ to the value they had at the time of the Setjmp\n"); void test9a() { - register p; + register int p; subtest = 1; p = 200; @@ -74,7 +74,7 @@ void test9a() void test9b() { - register p, q; + register int p, q; subtest = 2; p = 200; @@ -86,7 +86,7 @@ void test9b() void test9c() { - register p, q, r; + register int p, q, r; subtest = 3; p = 200; @@ -151,7 +151,7 @@ char * void garbage() { - register i, j, k; + register int i, j, k; register char *p, *q, *r; char *a; @@ -226,7 +226,7 @@ void garbage() void level1() { register char *p; - register i; + register int i; i = 1000; p = &buf[10]; @@ -238,7 +238,7 @@ void level1() void level2() { register char *p; - register i; + register int i; i = 0200; p = &buf[2]; @@ -249,7 +249,7 @@ void level2() void dolev() { register char *p; - register i; + register int i; i = 010; p = &buf[3];