* stdlib/msort.c (qsort): Add a cast to silence warning.
* stdio-common/vfprintf.c (process_string_arg): Likewise.
* libio/oldfileops.c (_IO_old_do_write): Likewise.
* sysdeps/unix/sysv/linux/getcwd.c (__getcwd): Likewise.
* sysdeps/unix/sysv/linux/ttyname.c (ttyname): Likewise.
* sysdeps/unix/sysv/linux/gethostid.c (gethostid): Likewise.
* argp/argp-fmtstream.c (__argp_fmtstream_printf): Likewise.
* nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise.
* sysdeps/unix/grantpt.c (grantpt): Likewise.
* libio/tst-widetext.c (main): Likewise.
* libio/tst-mmap2-eofsync.c (do_test): Likewise.
* rt/tst-aio.c (test_file): Likewise.
* rt/tst-aio64.c (test_file): Likewise.
* resolv/tst-aton.c (main): Likewise.
avail = fs->end - fs->p;
out = __vsnprintf (fs->p, avail, fmt, args);
va_end (args);
- if (out >= avail)
+ if ((size_t) out >= avail)
size_guess = out + 1;
}
- while (out >= avail);
+ while ((size_t) out >= avail);
fs->p += out;
const char *data;
_IO_size_t to_do;
{
- return (to_do == 0 || old_do_write (fp, data, to_do) == to_do)
+ return (to_do == 0 || (_IO_size_t) old_do_write (fp, data, to_do) == to_do)
? 0 : EOF;
}
}
c = write (temp_fd, pages + pagesize, pagesize);
- if (c == pagesize)
+ if (c == (ssize_t) pagesize)
printf ("wrote more to file\n");
else
{
exit (1);
}
- if ((size_t) nonr == -1 )
+ if (nonr == (size_t) -1)
{
printf ("\
%u: iconv returned with %Zd and errno = %m (inleft: %Zd, outleft: %Zd)\n",
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1998.
vec[1].iov_base = (void *) key;
vec[1].iov_len = keylen;
- if (__writev (sock, vec, 2) != sizeof (request_header) + keylen)
+ if ((size_t) __writev (sock, vec, 2) != sizeof (request_header) + keylen)
{
__close (sock);
return -1;
total_len += gr_resp.gr_name_len + gr_resp.gr_passwd_len;
/* Get this data. */
- if (__readv (sock, vec, 2) != total_len)
+ if ((size_t) __readv (sock, vec, 2) != total_len)
{
__close (sock);
return -1;
return 1;
}
- if (st.st_size != size)
+ if (st.st_size != (off_t) size)
{
error (0, errno, "%s: wrong size: %lu, should be %lu",
msg, (unsigned long int) st.st_size, (unsigned long int) size);
return 1;
}
- if (pread (fd, tmp, size, 0) != size)
+ if (pread (fd, tmp, size, 0) != (ssize_t) size)
{
error (0, errno, "%s: failed pread", msg);
return 1;
return 1;
}
- if (st.st_size != size)
+ if (st.st_size != (off_t) size)
{
error (0, errno, "%s: wrong size: %lu, should be %lu",
msg, (unsigned long int) st.st_size, (unsigned long int) size);
return 1;
}
- if (pread (fd, tmp, size, 0) != size)
+ if (pread (fd, tmp, size, 0) != (ssize_t) size)
{
error (0, errno, "%s: failed pread", msg);
return 1;
const char *mbs = (const char *) string; \
mbstate_t mbstate; \
\
- len = prec != -1 ? prec : strlen (mbs); \
+ len = prec != -1 ? (size_t) prec : strlen (mbs); \
\
/* Allocate dynamically an array which definitely is long \
enough for the wide character version. */ \
measured in bytes. */
/* If the memory requirements are too high don't allocate memory. */
- if (size / pagesize > phys_pages)
+ if (size / pagesize > (size_t) phys_pages)
_quicksort (b, n, s, cmp);
else
{
}
/* Get the group ID of the special `tty' group. */
- if (grbuflen == -1)
+ if (grbuflen == (size_t) -1L)
/* `sysconf' does not support _SC_GETGR_R_SIZE_MAX.
Try a moderate value. */
grbuflen = 1024;
{
if (path[0] == '/')
{
- if (n >= alloc_size - 1)
+ if ((size_t) n >= alloc_size - 1)
{
if (buf == NULL)
free (path);
in.s_addr = 0;
memcpy (&in, hp->h_addr,
- (int) sizeof (in) < hp->h_length ? sizeof (in) : hp->h_length);
+ (int) sizeof (in) < hp->h_length ? (int) sizeof (in) : hp->h_length);
/* For the return value to be not exactly the IP address we do some
bit fiddling. */
/* This is for Linux 2.0. */
&& ttyname_buf[0] != '[')
{
- if (len >= buflen)
+ if ((size_t) len >= buflen)
return NULL;
/* readlink need not terminate the string. */
ttyname_buf[len] = '\0';