From: Robert W. <ro...@us...> - 2002-03-27 22:56:12
|
FYI. Patched the CVS tree with these. - Robbie Robert V. Williamson Linux Test Project IBM Linux Technology Center Phone: (512) 838-9295 T/L: 638-9295 http://ltp.sourceforge.net Andreas Jaeger <aj...@su...> To: ltp...@li... Sent by: cc: ltp...@li...ur Subject: [LTP] Warning Patrol ceforge.net 03/27/2002 04:37 PM If you compile with warnings enabled, you'll get a number of warnings. The appended patch should fix these ones: gethost.c:27: warning: return type defaults to `int' gethost.c: In function `main': gethost.c:41: warning: implicit declaration of function `exit' gethost.c:51: warning: implicit declaration of function `strcmp' gethost.c:107: warning: control reaches end of non-void function rand_lines.c:520: warning: cast to pointer from integer of different size lftest.c:43: warning: return type defaults to `int' lftest.c: In function `main': lftest.c:55: warning: int format, different type arg (arg 2) There much more like these and some of them will hit you when running LTP on a 64-bit system. Andreas ============================================================ Index: tools/gethost.c --- tools/gethost.c 23 Jan 2002 19:30:57 -0000 1.1 +++ tools/gethost.c 27 Mar 2002 22:36:07 -0000 @@ -18,11 +18,14 @@ static char RcsId[] = "$Id: gethost.c,v #include <resolv.h> #include <netdb.h> #include <syslog.h> +#include <string.h> +#include <stdlib.h> #ifndef LOG_PERROR #define LOG_PERROR 0 #endif +int main(argc, argv) int argc; char **argv; ============================================================ Index: tools/rand_lines.c --- tools/rand_lines.c 28 Feb 2001 17:42:00 -0000 1.2 +++ tools/rand_lines.c 27 Mar 2002 22:36:07 -0000 @@ -420,7 +420,7 @@ long seed; int c; char line[MAX_LN_SZ]; /* max size of a line */ int cnt; /* offset printer counter */ - int loffset; /* last line address */ + long loffset; /* last line address */ char *buffer; /* malloc space for file reads */ char *rdbuff; /* where to start read */ long stopaddr; /* end of read space (address)*/ ============================================================ Index: testcases/kernel/fs/lftest/lftest.c --- testcases/kernel/fs/lftest/lftest.c 27 Aug 2001 22:15:12 -0000 1.1 +++ testcases/kernel/fs/lftest/lftest.c 27 Mar 2002 22:36:08 -0000 @@ -39,6 +39,7 @@ /* set write buffer size to whatever floats your boat. I usually use 1M */ #define BSIZE 1048576L +int main(int argc, char *argv[]) { off_t i; @@ -52,7 +53,7 @@ main(int argc, char *argv[]) if (argc != 2 || atoi(argv[1]) < 1) { - printf("usage:<# of %d buffers to write>\n",BSIZE); + printf("usage:<# of %ld buffers to write>\n",BSIZE); exit(3); } bufnum = strtol(argv[1],NULL,0); -- Andreas Jaeger SuSE Labs aj...@su... private aj...@ar... http://www.suse.de/~aj _______________________________________________ Ltp-list mailing list Ltp...@li... https://lists.sourceforge.net/lists/listinfo/ltp-list |