diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog index 708200531..3bb84bb36 100644 --- a/winsup/testsuite/ChangeLog +++ b/winsup/testsuite/ChangeLog @@ -1,3 +1,29 @@ +2003-02-19 Vaclav Haisman + + * winsup.api/crlf.c: Fix C signed/unsigned compare warning. + * winsup.api/mmaptest01.c: Ditto. + * winsup.api/ltp/chmod01.c: Ditto. + * winsup.api/ltp/fork04.c: Ditto. + * winsup.api/ltp/lseek03.c: Ditto. + * winsup.api/ltp/lseek06.c: Ditto. + * winsup.api/ltp/lseek07.c: Ditto. + * winsup.api/ltp/lseek08.c: Ditto. + * winsup.api/ltp/mmap001.c: Ditto. + * winsup.api/ltp/mmap02.c: Ditto. + * winsup.api/ltp/mmap03.c: Ditto. + * winsup.api/ltp/mmap04.c: Ditto. + * winsup.api/ltp/mmap05.c: Ditto. + * winsup.api/ltp/mmap06.c: Ditto. + * winsup.api/ltp/mmap07.c: Ditto. + * winsup.api/ltp/mmap08.c: Ditto. + * winsup.api/ltp/pipe11.c: Ditto. + * winsup.api/ltp/poll01.c: Ditto. + * winsup.api/ltp/sync02.c: Ditto. + * winsup.api/ltp/times03.c: Ditto. + * winsup.api/ltp/umask03.c: Ditto. + * winsup.api/ltp/getpgid01.c: Remove unused obsolete include. + * winsup.api/ltp/getpgid02.c: Ditto. + 2003-02-08 Christopher Faylor * winsup.api/winsup.exp (ws_spawn): Tweak slightly to work with tcl diff --git a/winsup/testsuite/winsup.api/crlf.c b/winsup/testsuite/winsup.api/crlf.c index ccabb8f69..ea79122f0 100644 --- a/winsup/testsuite/winsup.api/crlf.c +++ b/winsup/testsuite/winsup.api/crlf.c @@ -156,7 +156,7 @@ int commands[] = { int errors = 0; -#define num_commands (sizeof(commands)/sizeof(commands[0])) +#define num_commands (int)(sizeof(commands)/sizeof(commands[0])) int pc; int askfor, get, expect, count, posn, whence, size; diff --git a/winsup/testsuite/winsup.api/ltp/chmod01.c b/winsup/testsuite/winsup.api/ltp/chmod01.c index 1ae8a1665..c20e6172e 100644 --- a/winsup/testsuite/winsup.api/ltp/chmod01.c +++ b/winsup/testsuite/winsup.api/ltp/chmod01.c @@ -96,7 +96,7 @@ main(int ac, char **av) int lc; /* loop counter */ const char *msg; /* message returned from parse_opts */ int ind; /* counter variable for chmod(2) tests */ - int mode; /* file mode permission */ + unsigned mode; /* file mode permission */ TST_TOTAL = sizeof(Modes) / sizeof(int); diff --git a/winsup/testsuite/winsup.api/ltp/fork04.c b/winsup/testsuite/winsup.api/ltp/fork04.c index 901d88ae8..84bac0579 100644 --- a/winsup/testsuite/winsup.api/ltp/fork04.c +++ b/winsup/testsuite/winsup.api/ltp/fork04.c @@ -129,7 +129,7 @@ extern int Tst_count; /* Test Case counter for tst_* routines */ /* list of environment variables to test */ const char *environ_list[] = {"TERM","NoTSetzWq","TESTPROG"}; -#define NUMBER_OF_ENVIRON sizeof(environ_list)/sizeof(char *) +#define NUMBER_OF_ENVIRON (int)(sizeof(environ_list)/sizeof(char *)) int TST_TOTAL=NUMBER_OF_ENVIRON; /* Total number of test cases. */ /*************************************************************** diff --git a/winsup/testsuite/winsup.api/ltp/getpgid01.c b/winsup/testsuite/winsup.api/ltp/getpgid01.c index 70fc854c2..88907f413 100644 --- a/winsup/testsuite/winsup.api/ltp/getpgid01.c +++ b/winsup/testsuite/winsup.api/ltp/getpgid01.c @@ -44,7 +44,6 @@ #include #include -#include #include #include #include diff --git a/winsup/testsuite/winsup.api/ltp/getpgid02.c b/winsup/testsuite/winsup.api/ltp/getpgid02.c index 1304a9946..f6eaec6f6 100644 --- a/winsup/testsuite/winsup.api/ltp/getpgid02.c +++ b/winsup/testsuite/winsup.api/ltp/getpgid02.c @@ -46,7 +46,6 @@ #include #include -#include #include #include #include diff --git a/winsup/testsuite/winsup.api/ltp/lseek03.c b/winsup/testsuite/winsup.api/ltp/lseek03.c index e1916da50..51c303d85 100644 --- a/winsup/testsuite/winsup.api/ltp/lseek03.c +++ b/winsup/testsuite/winsup.api/ltp/lseek03.c @@ -137,7 +137,7 @@ main(int ac, char **av) int lc; /* loop counter */ const char *msg; /* message returned from parse_opts */ - int ind; + unsigned ind; int whence; TST_TOTAL=sizeof(Whences)/sizeof(int); diff --git a/winsup/testsuite/winsup.api/ltp/lseek06.c b/winsup/testsuite/winsup.api/ltp/lseek06.c index 638d876d8..f62c3422c 100644 --- a/winsup/testsuite/winsup.api/ltp/lseek06.c +++ b/winsup/testsuite/winsup.api/ltp/lseek06.c @@ -201,7 +201,7 @@ setup() } /* Write data into temporary file */ - if(write(fildes, write_buf, strlen(write_buf)) != strlen(write_buf)) { + if(write(fildes, write_buf, strlen(write_buf)) != (int)strlen(write_buf)) { tst_brkm(TBROK, cleanup, "write(2) on %s Failed, errno=%d : %s", TEMP_FILE, errno, strerror(errno)); } diff --git a/winsup/testsuite/winsup.api/ltp/lseek07.c b/winsup/testsuite/winsup.api/ltp/lseek07.c index 47bdf1d6b..c5a27b5b3 100644 --- a/winsup/testsuite/winsup.api/ltp/lseek07.c +++ b/winsup/testsuite/winsup.api/ltp/lseek07.c @@ -149,7 +149,7 @@ main(int ac, char **av) * the current offset position. */ if (write(fildes, write_buf2, strlen(write_buf2)) != - strlen(write_buf2)) { + (int)strlen(write_buf2)) { tst_brkm(TFAIL, cleanup, "write() failed to " "write additional data, error = %d", errno); @@ -244,7 +244,7 @@ setup() /* Write data into temporary file */ if(write(fildes, write_buf1, strlen(write_buf1)) != - strlen(write_buf1)) { + (int)strlen(write_buf1)) { tst_brkm(TBROK, cleanup, "write(2) on %s Failed, errno=%d : %s", TEMP_FILE, errno, strerror(errno)); } diff --git a/winsup/testsuite/winsup.api/ltp/lseek08.c b/winsup/testsuite/winsup.api/ltp/lseek08.c index ebef7c0bf..32fdcc0e4 100644 --- a/winsup/testsuite/winsup.api/ltp/lseek08.c +++ b/winsup/testsuite/winsup.api/ltp/lseek08.c @@ -84,7 +84,7 @@ const char *TCID="lseek03"; /* Test program identifier. */ int TST_TOTAL=1; /* Total number of test cases. */ extern int Tst_count; /* Test Case counter for tst_* routines */ int fildes; /* file handle for temp file */ -size_t file_size; /* size of the temporary file */ +ssize_t file_size; /* size of the temporary file */ void setup(); /* Main setup function of test */ void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */ diff --git a/winsup/testsuite/winsup.api/ltp/mmap001.c b/winsup/testsuite/winsup.api/ltp/mmap001.c index 40cca6f3e..6c47d49c1 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap001.c +++ b/winsup/testsuite/winsup.api/ltp/mmap001.c @@ -90,7 +90,7 @@ int main(int argc, char * argv[]) const char *msg; int i,lc; int fd; - unsigned int pages,memsize; + int pages,memsize; if ( (msg=parse_opts(argc, argv, options, help)) != (char *) NULL ) tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg); diff --git a/winsup/testsuite/winsup.api/ltp/mmap02.c b/winsup/testsuite/winsup.api/ltp/mmap02.c index 96634ee4e..33a12738c 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap02.c +++ b/winsup/testsuite/winsup.api/ltp/mmap02.c @@ -225,7 +225,7 @@ setup() } /* Write test buffer contents into temporary file */ - if (write(fildes, tst_buff, sizeof(tst_buff)) < sizeof(tst_buff)) { + if (write(fildes, tst_buff, sizeof(tst_buff)) < (int)sizeof(tst_buff)) { tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s", TEMPFILE, errno, strerror(errno)); free(tst_buff); diff --git a/winsup/testsuite/winsup.api/ltp/mmap03.c b/winsup/testsuite/winsup.api/ltp/mmap03.c index de873fcb0..9302d335d 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap03.c +++ b/winsup/testsuite/winsup.api/ltp/mmap03.c @@ -225,7 +225,7 @@ setup() } /* Write test buffer contents into temporary file */ - if (write(fildes, tst_buff, strlen(tst_buff)) < strlen(tst_buff)) { + if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) { tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s", TEMPFILE, errno, strerror(errno)); free(tst_buff); diff --git a/winsup/testsuite/winsup.api/ltp/mmap04.c b/winsup/testsuite/winsup.api/ltp/mmap04.c index b82904dec..64d3a8ebe 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap04.c +++ b/winsup/testsuite/winsup.api/ltp/mmap04.c @@ -225,7 +225,7 @@ setup() } /* Write test buffer contents into temporary file */ - if (write(fildes, tst_buff, strlen(tst_buff)) < strlen(tst_buff)) { + if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) { tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s", TEMPFILE, errno, strerror(errno)); free(tst_buff); diff --git a/winsup/testsuite/winsup.api/ltp/mmap05.c b/winsup/testsuite/winsup.api/ltp/mmap05.c index 3a7783df8..bcdfd0cd8 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap05.c +++ b/winsup/testsuite/winsup.api/ltp/mmap05.c @@ -228,7 +228,8 @@ setup() } /* Write test buffer contents into temporary file */ - if (write(fildes, tst_buff, strlen(tst_buff)) != strlen(tst_buff)) { + if (write(fildes, tst_buff, strlen(tst_buff)) + != (int)strlen(tst_buff)) { tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s", TEMPFILE, errno, strerror(errno)); free(tst_buff); diff --git a/winsup/testsuite/winsup.api/ltp/mmap06.c b/winsup/testsuite/winsup.api/ltp/mmap06.c index 4c9c95880..ec113c077 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap06.c +++ b/winsup/testsuite/winsup.api/ltp/mmap06.c @@ -197,7 +197,7 @@ setup() } /* Write test buffer contents into temporary file */ - if (write(fildes, tst_buff, strlen(tst_buff)) < strlen(tst_buff)) { + if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) { tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s", TEMPFILE, errno, strerror(errno)); diff --git a/winsup/testsuite/winsup.api/ltp/mmap07.c b/winsup/testsuite/winsup.api/ltp/mmap07.c index 5f26abf91..ab989f443 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap07.c +++ b/winsup/testsuite/winsup.api/ltp/mmap07.c @@ -198,7 +198,7 @@ setup() } /* Write test buffer contents into temporary file */ - if (write(fildes, tst_buff, strlen(tst_buff)) < strlen(tst_buff)) { + if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) { tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s", TEMPFILE, errno, strerror(errno)); free(tst_buff); diff --git a/winsup/testsuite/winsup.api/ltp/mmap08.c b/winsup/testsuite/winsup.api/ltp/mmap08.c index 8af8cb51b..543c5397b 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap08.c +++ b/winsup/testsuite/winsup.api/ltp/mmap08.c @@ -191,7 +191,8 @@ setup() } /* Write test buffer contents into temporary file */ - if (write(fildes, tst_buff, strlen(tst_buff)) != strlen(tst_buff)) { + if (write(fildes, tst_buff, strlen(tst_buff)) + != (int)strlen(tst_buff)) { tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s", TEMPFILE, errno, strerror(errno)); free(tst_buff); diff --git a/winsup/testsuite/winsup.api/ltp/pipe11.c b/winsup/testsuite/winsup.api/ltp/pipe11.c index 338f90602..558e70a96 100644 --- a/winsup/testsuite/winsup.api/ltp/pipe11.c +++ b/winsup/testsuite/winsup.api/ltp/pipe11.c @@ -203,7 +203,7 @@ setup() j = 0; for (i = 0; i < szcharbuf; ) { wrbuf[i++] = rawchars[j++]; - if (j >= sizeof(rawchars)) { + if (j >= (int)sizeof(rawchars)) { j = 0; } } diff --git a/winsup/testsuite/winsup.api/ltp/poll01.c b/winsup/testsuite/winsup.api/ltp/poll01.c index 5cb71057b..704b738a2 100644 --- a/winsup/testsuite/winsup.api/ltp/poll01.c +++ b/winsup/testsuite/winsup.api/ltp/poll01.c @@ -122,7 +122,7 @@ main(int ac, char **av) /* write the message to the pipe */ if (write(fildes[1], write_buf, strlen(write_buf)) - < strlen(write_buf)) { + < (int)strlen(write_buf)) { tst_brkm(TBROK, cleanup, "write() failed on write " "to pipe, error:%d", errno); } @@ -166,7 +166,7 @@ main(int ac, char **av) /* Read data from read end of pipe */ if (read(fildes[0], read_buf, sizeof(read_buf)) != - strlen(write_buf)) { + (int)strlen(write_buf)) { tst_brkm(TFAIL, NULL, "read() failed - " "error:%d", errno); exit(1); diff --git a/winsup/testsuite/winsup.api/ltp/sync02.c b/winsup/testsuite/winsup.api/ltp/sync02.c index 2173fd788..5535e1add 100644 --- a/winsup/testsuite/winsup.api/ltp/sync02.c +++ b/winsup/testsuite/winsup.api/ltp/sync02.c @@ -199,7 +199,7 @@ setup() /* Write the buffer data into file */ if (write(fildes, write_buffer, strlen(write_buffer)) != \ - strlen(write_buffer)) { + (int)strlen(write_buffer)) { tst_brkm(TBROK, cleanup, "write() failed to write buffer data to %s", TEMP_FILE); diff --git a/winsup/testsuite/winsup.api/ltp/times03.c b/winsup/testsuite/winsup.api/ltp/times03.c index 4e3fb56f8..453d311cc 100644 --- a/winsup/testsuite/winsup.api/ltp/times03.c +++ b/winsup/testsuite/winsup.api/ltp/times03.c @@ -88,7 +88,7 @@ main(int argc, char **argv) */ start_time = time(NULL); for (;;) { - if (times(&buf1) == -1) { + if (times(&buf1) == (clock_t)-1) { TEST_ERROR_LOG(errno); tst_resm(TFAIL, "Call to times(2) " "failed, errno = %d", errno); @@ -98,7 +98,7 @@ main(int argc, char **argv) break; } } - if (times(&buf1) == -1) { + if (times(&buf1) == (clock_t)-1) { TEST_ERROR_LOG(errno); tst_resm(TFAIL, "Call to times(2) failed, " "errno = %d", errno); @@ -145,7 +145,7 @@ main(int argc, char **argv) */ start_time = time(NULL); for (;;) { - if (times(&buf2) == -1) { + if (times(&buf2) == (clock_t)-1) { tst_resm(TFAIL, "Call to times " "failed, " @@ -166,7 +166,7 @@ main(int argc, char **argv) tst_resm(TFAIL, "Call to times(2) " "failed in child"); } - if (times(&buf2) == -1) { + if (times(&buf2) == (clock_t)-1) { TEST_ERROR_LOG(TEST_ERRNO); tst_resm(TFAIL, "Call to times failed " "errno = %d", errno); diff --git a/winsup/testsuite/winsup.api/ltp/umask03.c b/winsup/testsuite/winsup.api/ltp/umask03.c index fbe2d5caa..341da7507 100644 --- a/winsup/testsuite/winsup.api/ltp/umask03.c +++ b/winsup/testsuite/winsup.api/ltp/umask03.c @@ -67,7 +67,7 @@ main(int argc, char **argv) const char *msg; struct stat statbuf; - int mskval = 0000; + unsigned mskval = 0000; int fildes, i; unsigned low9mode; diff --git a/winsup/testsuite/winsup.api/mmaptest01.c b/winsup/testsuite/winsup.api/mmaptest01.c index 33545587c..99a7d2ef1 100644 --- a/winsup/testsuite/winsup.api/mmaptest01.c +++ b/winsup/testsuite/winsup.api/mmaptest01.c @@ -87,7 +87,7 @@ int main () char buf3[20]; - int i; + unsigned i; strcpy (fnam1, "mmaptest01.1.XXXXXX"); strcpy (fnam2, "mmaptest01.2.XXXXXX");