* 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-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
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;
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);
/* 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. */
/***************************************************************
#include <sys/types.h>
#include <errno.h>
-#include <varargs.h>
#include <sys/wait.h>
#include <test.h>
#include <usctest.h>
#include <sys/types.h>
#include <errno.h>
-#include <varargs.h>
#include <sys/wait.h>
#include <test.h>
#include <usctest.h>
int lc; /* loop counter */
const char *msg; /* message returned from parse_opts */
- int ind;
+ unsigned ind;
int whence;
TST_TOTAL=sizeof(Whences)/sizeof(int);
}
/* 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));
}
* 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);
/* 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));
}
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 */
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);
}
/* 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);
}
/* 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);
}
/* 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);
}
/* 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);
}
/* 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));
}
/* 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);
}
/* 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);
j = 0;
for (i = 0; i < szcharbuf; ) {
wrbuf[i++] = rawchars[j++];
- if (j >= sizeof(rawchars)) {
+ if (j >= (int)sizeof(rawchars)) {
j = 0;
}
}
/* 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);
}
/* 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);
/* 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);
*/
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);
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);
*/
start_time = time(NULL);
for (;;) {
- if (times(&buf2) == -1) {
+ if (times(&buf2) == (clock_t)-1) {
tst_resm(TFAIL,
"Call to times "
"failed, "
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);
const char *msg;
struct stat statbuf;
- int mskval = 0000;
+ unsigned mskval = 0000;
int fildes, i;
unsigned low9mode;
char buf3[20];
- int i;
+ unsigned i;
strcpy (fnam1, "mmaptest01.1.XXXXXX");
strcpy (fnam2, "mmaptest01.2.XXXXXX");