OSDN Git Service

* winsup.api/crlf.c: Fix C signed/unsigned compare warning.
authorcorinna <corinna>
Thu, 20 Feb 2003 11:22:16 +0000 (11:22 +0000)
committercorinna <corinna>
Thu, 20 Feb 2003 11:22:16 +0000 (11:22 +0000)
* 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.

24 files changed:
winsup/testsuite/ChangeLog
winsup/testsuite/winsup.api/crlf.c
winsup/testsuite/winsup.api/ltp/chmod01.c
winsup/testsuite/winsup.api/ltp/fork04.c
winsup/testsuite/winsup.api/ltp/getpgid01.c
winsup/testsuite/winsup.api/ltp/getpgid02.c
winsup/testsuite/winsup.api/ltp/lseek03.c
winsup/testsuite/winsup.api/ltp/lseek06.c
winsup/testsuite/winsup.api/ltp/lseek07.c
winsup/testsuite/winsup.api/ltp/lseek08.c
winsup/testsuite/winsup.api/ltp/mmap001.c
winsup/testsuite/winsup.api/ltp/mmap02.c
winsup/testsuite/winsup.api/ltp/mmap03.c
winsup/testsuite/winsup.api/ltp/mmap04.c
winsup/testsuite/winsup.api/ltp/mmap05.c
winsup/testsuite/winsup.api/ltp/mmap06.c
winsup/testsuite/winsup.api/ltp/mmap07.c
winsup/testsuite/winsup.api/ltp/mmap08.c
winsup/testsuite/winsup.api/ltp/pipe11.c
winsup/testsuite/winsup.api/ltp/poll01.c
winsup/testsuite/winsup.api/ltp/sync02.c
winsup/testsuite/winsup.api/ltp/times03.c
winsup/testsuite/winsup.api/ltp/umask03.c
winsup/testsuite/winsup.api/mmaptest01.c

index 7082005..3bb84bb 100644 (file)
@@ -1,3 +1,29 @@
+2003-02-19  Vaclav Haisman  <V.Haisman@sh.cvut.cz>
+
+       * 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  <cgf@redhat.com>
 
        * winsup.api/winsup.exp (ws_spawn): Tweak slightly to work with tcl
index ccabb8f..ea79122 100644 (file)
@@ -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;
index 1ae8a16..c20e617 100644 (file)
@@ -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);
 
index 901d88a..84bac05 100644 (file)
@@ -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. */
 
 /***************************************************************
index 70fc854..88907f4 100644 (file)
@@ -44,7 +44,6 @@
 
 #include <sys/types.h>
 #include <errno.h>
-#include <varargs.h>
 #include <sys/wait.h>
 #include <test.h>
 #include <usctest.h>
index 1304a99..f6eaec6 100644 (file)
@@ -46,7 +46,6 @@
 
 #include <sys/types.h>
 #include <errno.h>
-#include <varargs.h>
 #include <sys/wait.h>
 #include <test.h>
 #include <usctest.h>
index e1916da..51c303d 100644 (file)
@@ -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);
index 638d876..f62c342 100644 (file)
@@ -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));
        }
index 47bdf1d..c5a27b5 100644 (file)
@@ -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));
        }
index ebef7c0..32fdcc0 100644 (file)
@@ -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 */
index 40cca6f..6c47d49 100644 (file)
@@ -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);
index 96634ee..33a1273 100644 (file)
@@ -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);
index de873fc..9302d33 100644 (file)
@@ -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);
index b82904d..64d3a8e 100644 (file)
@@ -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);
index 3a7783d..bcdfd0c 100644 (file)
@@ -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);
index 4c9c958..ec113c0 100644 (file)
@@ -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));
index 5f26abf..ab989f4 100644 (file)
@@ -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);
index 8af8cb5..543c539 100644 (file)
@@ -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);
index 338f906..558e70a 100644 (file)
@@ -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;
                }
        }
index 5cb7105..704b738 100644 (file)
@@ -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);
index 2173fd7..5535e1a 100644 (file)
@@ -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);
index 4e3fb56..453d311 100644 (file)
@@ -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);
index fbe2d5c..341da75 100644 (file)
@@ -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;
 
index 3354558..99a7d2e 100644 (file)
@@ -87,7 +87,7 @@ int main ()
 
   char buf3[20];
 
-  int i;
+  unsigned i;
 
   strcpy (fnam1, "mmaptest01.1.XXXXXX");
   strcpy (fnam2, "mmaptest01.2.XXXXXX");