From: Robert W. <ro...@us...> - 2003-03-14 16:27:06
|
Applied to CVS tree. - Robbie Robert V. Williamson <ro...@us...> Linux Test Project IBM Linux Technology Center Phone: (512) 838-9295 T/L: 678-9295 Fax: (512) 838-4603 Web: http://ltp.sourceforge.net IRC: #ltp on freenode.irc.net ==================== "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -Albert Einstein Andreas Jaeger <aj...@su...> To: ltp...@li... Sent by: cc: ltp...@li...ur Subject: [LTP] more warning fixes ceforge.net 03/14/2003 02:25 AM Another round of warning fixes. This time for: diotest_routines.c:125: warning: implicit declaration of function `close' diotest_routines.c:130: warning: implicit declaration of function `read' diotest_routines.c:113: warning: unused variable `ret' diotest_routines.c: In function `forkchldrn': diotest_routines.c:175: warning: implicit declaration of function `fork' diotest_routines.c:179: warning: implicit declaration of function `killchldrn' diotest_routines.c: At top level: diotest_routines.c:214: warning: return type defaults to `int' diotest_routines.c: In function `waitchldrn': diotest_routines.c:221: warning: implicit declaration of function `waitpid' diotest1.c:147: warning: implicit declaration of function `fillbuf' diotest1.c:178: warning: implicit declaration of function `filecmp' diotest2.c:94: warning: implicit declaration of function `fillbuf' diotest2.c:113: warning: implicit declaration of function `bufcmp' diotest3.c:106: warning: implicit declaration of function `runtest' diotest3.c:190: warning: implicit declaration of function `fillbuf' diotest3.c:217: warning: implicit declaration of function `bufcmp' diotest3.c:274: warning: implicit declaration of function `forkchldrn' diotest3.c:279: warning: implicit declaration of function `waitchldrn' diotest4.c:216: warning: implicit declaration of function `fillbuf' diotest4.c:575: warning: too many arguments for format diotest5.c:115: warning: implicit declaration of function `vfillbuf' diotest5.c:135: warning: implicit declaration of function `vbufcmp' diotest5.c:164: warning: return type defaults to `int' diotest6.c:107: warning: implicit declaration of function `runtest' diotest6.c:209: warning: implicit declaration of function `vfillbuf' diotest6.c:236: warning: implicit declaration of function `bufcmp' execve02.c:80: warning: return type defaults to `int' execve02.c:110: warning: implicit declaration of function `chmod' execve02.c:148: warning: implicit declaration of function `wait' execve02.c:188: warning: implicit declaration of function `umask' execve03.c:119: warning: return type defaults to `int' execve03.c:177: warning: implicit declaration of function `umask' execve03.c:212: warning: implicit declaration of function `creat' execve04.c:79: warning: return type defaults to `int' execve04.c:172: warning: implicit declaration of function `creat' execve05.c:74: warning: return type defaults to `int' execve05.c:145: warning: implicit declaration of function `waitpid' execve06.c:63: warning: return type defaults to `int' execve06.c:70: warning: return type defaults to `int' execve06.c:183: warning: implicit declaration of function `wait' execve06.c:97: warning: label `block1' defined but not used change_owner.c:54: warning: implicit declaration of function `exit' change_owner.c:67: warning: implicit declaration of function `strcmp' Andreas ============================================================ Index: testcases/kernel/io/direct_io/diotest_routines.c --- testcases/kernel/io/direct_io/diotest_routines.c 13 Jun 2002 05:26:55 -0000 1.1 +++ testcases/kernel/io/direct_io/diotest_routines.c 14 Mar 2003 08:22:25 -0000 @@ -40,8 +40,14 @@ #include <signal.h> #include <fcntl.h> #include <sys/types.h> +#include <sys/wait.h> #include <sys/uio.h> #include <errno.h> +#include <unistd.h> + +#include "diotest_routines.h" + + /* **** Routines for buffer actions, comparisions **** */ @@ -210,6 +216,7 @@ killchldrn(int **pidlst, int numchld, in /* * waitchldrn: wait for child process listed in pidlst to finish. */ +int waitchldrn(int **pidlst, int numchld) { int i, cpid, ret, errflag = 0; ============================================================ Index: testcases/kernel/io/direct_io/diotest1.c --- testcases/kernel/io/direct_io/diotest1.c 13 Mar 2003 15:39:54 -0000 1.2 +++ testcases/kernel/io/direct_io/diotest1.c 14 Mar 2003 08:22:25 -0000 @@ -50,6 +50,8 @@ #include "test.h" #include "usctest.h" +#include "diotest_routines.h" + #ifdef O_DIRECT #define BUFSIZE 8192 ============================================================ Index: testcases/kernel/io/direct_io/diotest2.c --- testcases/kernel/io/direct_io/diotest2.c 13 Mar 2003 15:39:55 -0000 1.2 +++ testcases/kernel/io/direct_io/diotest2.c 14 Mar 2003 08:22:25 -0000 @@ -53,6 +53,8 @@ #include <sys/types.h> #include <errno.h> +#include "diotest_routines.h" + #include "test.h" #include "usctest.h" ============================================================ Index: testcases/kernel/io/direct_io/diotest3.c --- testcases/kernel/io/direct_io/diotest3.c 13 Mar 2003 15:39:56 -0000 1.2 +++ testcases/kernel/io/direct_io/diotest3.c 14 Mar 2003 08:22:25 -0000 @@ -53,6 +53,8 @@ #include <sys/fcntl.h> #include <errno.h> +#include "diotest_routines.h" + #include "test.h" #include "usctest.h" ============================================================ Index: testcases/kernel/io/direct_io/diotest4.c --- testcases/kernel/io/direct_io/diotest4.c 13 Mar 2003 15:39:57 -0000 1.4 +++ testcases/kernel/io/direct_io/diotest4.c 14 Mar 2003 08:22:25 -0000 @@ -66,6 +66,8 @@ #include <sys/mman.h> #include <errno.h> +#include "diotest_routines.h" + #include "test.h" #include "usctest.h" @@ -572,7 +574,7 @@ main(int argc, char *argv[]) exit(1); } fprintf(stderr, "diotest4: %d testblocks completed\n", - total, fblocks); + total); exit(0); } ============================================================ Index: testcases/kernel/io/direct_io/diotest5.c --- testcases/kernel/io/direct_io/diotest5.c 13 Mar 2003 15:39:58 -0000 1.2 +++ testcases/kernel/io/direct_io/diotest5.c 14 Mar 2003 08:22:25 -0000 @@ -56,6 +56,8 @@ #include <sys/uio.h> #include <errno.h> +#include "diotest_routines.h" + #include "test.h" #include "usctest.h" @@ -160,6 +162,7 @@ prg_usage() exit(1); } +int main(int argc, char *argv[]) { int i, action, fd_r, fd_w; ============================================================ Index: testcases/kernel/io/direct_io/diotest6.c --- testcases/kernel/io/direct_io/diotest6.c 13 Mar 2003 15:39:58 -0000 1.2 +++ testcases/kernel/io/direct_io/diotest6.c 14 Mar 2003 08:22:25 -0000 @@ -53,6 +53,8 @@ #include <sys/uio.h> #include <errno.h> +#include "diotest_routines.h" + #include "test.h" #include "usctest.h" ============================================================ Index: testcases/kernel/syscalls/execve/execve02.c --- testcases/kernel/syscalls/execve/execve02.c 25 Sep 2002 17:34:14 -0000 1.4 +++ testcases/kernel/syscalls/execve/execve02.c 14 Mar 2003 08:22:25 -0000 @@ -50,6 +50,9 @@ #include <unistd.h> #include <errno.h> #include <pwd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/wait.h> #include "test.h" #include "usctest.h" @@ -76,6 +79,7 @@ char user1name[] = "nobody"; extern struct passwd * my_getpwnam(char *); struct passwd *ltpuser1; +int main(int ac, char **av) { int lc; /* loop counter */ ============================================================ Index: testcases/kernel/syscalls/execve/execve03.c --- testcases/kernel/syscalls/execve/execve03.c 23 Jul 2002 13:11:18 -0000 1.3 +++ testcases/kernel/syscalls/execve/execve03.c 14 Mar 2003 08:22:25 -0000 @@ -71,6 +71,11 @@ #include <usctest.h> #include <pwd.h> #include <sys/mman.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + + char *TCID = "execve03"; int TST_TOTAL = 6; @@ -115,6 +120,7 @@ struct test_case_t { {test_name6, ENOEXEC} }; +int main(int ac, char **av) { int lc; /* loop counter */ ============================================================ Index: testcases/kernel/syscalls/execve/execve04.c --- testcases/kernel/syscalls/execve/execve04.c 10 Sep 2001 20:26:02 -0000 1.3 +++ testcases/kernel/syscalls/execve/execve04.c 14 Mar 2003 08:22:25 -0000 @@ -48,6 +48,9 @@ #include <stdio.h> #include <errno.h> #include <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> #include <test.h> #include <usctest.h> @@ -75,6 +78,7 @@ option_t options[] = { {NULL, NULL, NULL} }; +int main(int ac, char **av) { int lc; /* loop counter */ ============================================================ Index: testcases/kernel/syscalls/execve/execve05.c --- testcases/kernel/syscalls/execve/execve05.c 17 Sep 2001 18:36:13 -0000 1.4 +++ testcases/kernel/syscalls/execve/execve05.c 14 Mar 2003 08:22:25 -0000 @@ -48,6 +48,8 @@ #include <stdio.h> #include <errno.h> #include <fcntl.h> +#include <sys/types.h> +#include <sys/wait.h> #include "test.h" #include "usctest.h" @@ -70,6 +72,7 @@ option_t options[] = { {NULL, NULL, NULL} }; +int main(int ac, char **av) { int lc; /* loop counter */ ============================================================ Index: testcases/kernel/syscalls/execve/execve06.c --- testcases/kernel/syscalls/execve/execve06.c 4 Sep 2001 20:20:17 -0000 1.2 +++ testcases/kernel/syscalls/execve/execve06.c 14 Mar 2003 08:22:25 -0000 @@ -40,6 +40,8 @@ #include <stdio.h> #include <errno.h> +#include <sys/types.h> +#include <sys/wait.h> #include "test.h" #include "usctest.h" @@ -59,13 +61,15 @@ char *prog; char *av[6]; char *ev[1]; -usage() +void +usage(void) { tst_resm(TBROK, "usage: %s <iters> <fname1> <fname2> <count>", TCID); tst_resm(TINFO, "example: %s 20 test1 test2 4\n", TCID); tst_exit(); } +int main(int ac, char **av) { char iter[20]; @@ -94,7 +98,6 @@ main(int ac, char **av) /* reset Tst_count in case we are looping */ Tst_count = 0; -block1: prog = av[0]; iterations = atoi(av[1]); fname1 = av[2]; ============================================================ Index: testcases/kernel/syscalls/fchmod/change_owner.c --- testcases/kernel/syscalls/fchmod/change_owner.c 12 Apr 2002 18:25:43 -0000 1.7 +++ testcases/kernel/syscalls/fchmod/change_owner.c 14 Mar 2003 08:22:25 -0000 @@ -31,6 +31,8 @@ #include <pwd.h> #include <grp.h> #include <errno.h> +#include <stdlib.h> +#include <string.h> int main(int argc, char **argv) ============================================================ Index: testcases/kernel/syscalls/fchown/change_owner.c --- testcases/kernel/syscalls/fchown/change_owner.c 12 Apr 2002 18:25:44 -0000 1.6 +++ testcases/kernel/syscalls/fchown/change_owner.c 14 Mar 2003 08:22:25 -0000 @@ -31,6 +31,8 @@ #include <pwd.h> #include <grp.h> #include <errno.h> +#include <stdlib.h> +#include <string.h> int main(int argc, char **argv) ============================================================ Index: testcases/kernel/io/direct_io/diotest_routines.h --- testcases/kernel/io/direct_io/diotest_routines.h created +++ testcases/kernel/io/direct_io/diotest_routines.h 2003-03-14 09:11:41.000000000 +0100 1.1 @@ -0,0 +1,12 @@ + +struct iovec; +extern void fillbuf(char *buf, int count, char value); +extern int filecmp(char *f1, char *f2); +extern int bufcmp(char *b1, char *b2, int bsize); +extern int vbufcmp(struct iovec *iv1, struct iovec *iv2, int vcnt); + +extern int forkchldrn(int **pidlst, int numchld, int action, int (*chldfunc)()); +extern int waitchldrn(int **pidlst, int numchld); +extern int killchldrn(int **pidlst, int numchld, int sig); + + -- Andreas Jaeger SuSE Labs aj...@su... private aj...@ar... http://www.suse.de/~aj ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ Ltp-list mailing list Ltp...@li... https://lists.sourceforge.net/lists/listinfo/ltp-list |