mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
2000-11-20 Jakub Jelinek <jakub@redhat.com> * iconvdata/bug-iconv2.c (main): Use %zd in format string. * io/test-lfs.c (do_test): Cast statbuf.st_size to long long. * malloc/tst-valloc.c (main): Cast valloc return value to long. * malloc/tst-obstack.c (verbose_malloc): Use %zd in format string. * math/test-fpucw.c (main): Use %lx in format string, cast control words to long. * stdio-common/tst-fmemopen.c (main): Use %td in format strings. * stdlib/tst-strtol.c (tests): Avoid (bogus?) decimal constant is so large that it is unsigned warning. * sysdeps/unix/sysv/linux/sparc/bits/types.h (__ssize_t): Changing it to long on sparc64. 2000-11-20 Andreas Jaeger <aj@suse.de> * nscd/nscd.h (termination_handler): Add noreturn attribute. (receiv_print_stats): Likewise. * elf/ldconfig.c (path_hwcap): Cast -1 for proper comparison.
This commit is contained in:
@ -128,7 +128,8 @@ main (void)
|
||||
|
||||
for (n = 0; n < NWRITERS; ++n)
|
||||
{
|
||||
int err = pthread_create (&thwr[n], NULL, writer_thread, (void *) n);
|
||||
int err = pthread_create (&thwr[n], NULL, writer_thread,
|
||||
(void *) (long int) n);
|
||||
|
||||
if (err != 0)
|
||||
error (EXIT_FAILURE, err, "cannot create writer thread");
|
||||
@ -136,7 +137,8 @@ main (void)
|
||||
|
||||
for (n = 0; n < NREADERS; ++n)
|
||||
{
|
||||
int err = pthread_create (&thrd[n], NULL, reader_thread, (void *) n);
|
||||
int err = pthread_create (&thrd[n], NULL, reader_thread,
|
||||
(void *) (long int) n);
|
||||
|
||||
if (err != 0)
|
||||
error (EXIT_FAILURE, err, "cannot create reader thread");
|
||||
|
@ -19,7 +19,7 @@ static void *
|
||||
worker (void *arg)
|
||||
{
|
||||
void *result = NULL;
|
||||
int nr = (int) arg;
|
||||
int nr = (long int) arg;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ROUNDS; ++i)
|
||||
@ -110,7 +110,7 @@ do_test (void)
|
||||
|
||||
/* Start the threads. */
|
||||
for (i = 0; i < NTHREADS; ++i)
|
||||
if (pthread_create (&threads[i], NULL, worker, (void *) i) != 0)
|
||||
if (pthread_create (&threads[i], NULL, worker, (void *) (long int) i) != 0)
|
||||
{
|
||||
printf ("Failed to start thread %d\n", i);
|
||||
exit (1);
|
||||
|
@ -35,7 +35,7 @@ int main(int argc, char ** argv)
|
||||
|
||||
/* Create the searching threads */
|
||||
for (started=0; started<NUM_THREADS; started++)
|
||||
pthread_create(&threads[started], NULL, search, (void *)pid);
|
||||
pthread_create(&threads[started], NULL, search, (void *) (long int) pid);
|
||||
|
||||
/* Wait for (join) all the searching threads */
|
||||
for (i=0; i<NUM_THREADS; i++)
|
||||
@ -66,7 +66,7 @@ void print_it(void *arg)
|
||||
|
||||
void *search(void *arg)
|
||||
{
|
||||
int num = (int) arg;
|
||||
int num = (long int) arg;
|
||||
int i, j, ntries;
|
||||
pthread_t tid;
|
||||
|
||||
|
@ -68,7 +68,7 @@ main (void)
|
||||
|
||||
pthread_join (th, &res);
|
||||
|
||||
return (int) res;
|
||||
return (int) (long int) res;
|
||||
}
|
||||
|
||||
|
||||
@ -97,5 +97,5 @@ thread (void *arg)
|
||||
if (status == 0)
|
||||
status = var != (PREPARE_BIT | PARENT_BIT);
|
||||
|
||||
return (void *) status;
|
||||
return (void *) (long int) status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user