about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-03-06 04:51:37 +0000
committerUlrich Drepper <drepper@redhat.com>2005-03-06 04:51:37 +0000
commit3cc4a09733deb0e9313f820e148ada9a3007e6b0 (patch)
tree1a078e7f4a335f0c559cbc44317348ae611ae515 /sysdeps
parent103f1eb02d919d6df0a5d2d29cb58e403bf2a10a (diff)
downloadglibc-3cc4a09733deb0e9313f820e148ada9a3007e6b0.tar.gz
glibc-3cc4a09733deb0e9313f820e148ada9a3007e6b0.tar.xz
glibc-3cc4a09733deb0e9313f820e148ada9a3007e6b0.zip
* wcsmbs/wctob.c (wctob): Make buf array of unsigned char.
	* sysdeps/generic/strchrnul.c: Add cast to avoid warning.
	* libio/iofwide.c: Add casts to avoid warnings.
	* stdio-common/printf-prs.c (parse_printf_format): Introduce new
	variable f to avoid warnings.
	* sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext):
	Fix a few casts to avoid warnings.
	* iconv/gconv_simple.c (internal_utf8_loop): Make start unsigned
	to avoid warning.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/strchrnul.c6
-rw-r--r--sysdeps/gnu/errlist.c5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/makecontext.c20
3 files changed, 17 insertions, 14 deletions
diff --git a/sysdeps/generic/strchrnul.c b/sysdeps/generic/strchrnul.c
index f04b303b82..88b96dd126 100644
--- a/sysdeps/generic/strchrnul.c
+++ b/sysdeps/generic/strchrnul.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,93,94,95,96,97,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1993-1997,99,2000,2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
    with help from Dan Sahlin (dan@sics.se) and
@@ -43,8 +43,8 @@ __strchrnul (s, c_in)
 
   /* Handle the first few characters by reading one character at a time.
      Do this until CHAR_PTR is aligned on a longword boundary.  */
-  for (char_ptr = s; ((unsigned long int) char_ptr
-		      & (sizeof (longword) - 1)) != 0;
+  for (char_ptr = (const unsigned char *) s;
+       ((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0;
        ++char_ptr)
     if (*char_ptr == c || *char_ptr == '\0')
       return (void *) char_ptr;
diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c
index 9ae6ec3c1d..1508311a4a 100644
--- a/sysdeps/gnu/errlist.c
+++ b/sysdeps/gnu/errlist.c
@@ -1410,8 +1410,9 @@ TRANS error; @pxref{Cancel AIO Operations}. */
 #endif
   };
 
-const int _sys_nerr_internal
-  = sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0];
+#define NERR \
+  (sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0])
+const int _sys_nerr_internal = NERR;
 
 #if !defined NOT_IN_libc && !ERRLIST_NO_COMPAT
 # include <errlist-compat.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/makecontext.c b/sysdeps/unix/sysv/linux/x86_64/makecontext.c
index c763556b93..6597d8980b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/makecontext.c
+++ b/sysdeps/unix/sysv/linux/x86_64/makecontext.c
@@ -1,5 +1,5 @@
 /* Create new context.
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 2002.
 
@@ -20,6 +20,7 @@
 
 #include <sysdep.h>
 #include <stdarg.h>
+#include <stdint.h>
 #include <ucontext.h>
 
 #include "ucontext_i.h"
@@ -52,28 +53,29 @@ void
 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
 {
   extern void __start_context (void);
-  unsigned long *sp, idx_uc_link;
+  unsigned long int *sp, idx_uc_link;
   va_list ap;
   int i;
 
   /* Generate room on stack for parameter if needed and uc_link.  */
-  sp = (long *) ((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
+  sp = (unsigned long int *) ((uintptr_t) ucp->uc_stack.ss_sp
+			      + ucp->uc_stack.ss_size);
   sp -= (argc > 6 ? argc - 6 : 0) + 1;
   /* Align stack and make space for trampoline address.  */
-  sp = (long *) ((((long) sp) & -16L) - 8);
+  sp = (unsigned long int *) ((((uintptr_t) sp) & -16L) - 8);
 
   idx_uc_link = (argc > 6 ? argc - 6 : 0) + 1;
 
   /* Setup context ucp.  */
   /* Address to jump to.  */
-  ucp->uc_mcontext.gregs[REG_RIP] = (long) func;
+  ucp->uc_mcontext.gregs[REG_RIP] = (long int) func;
   /* Setup rbx.*/
-  ucp->uc_mcontext.gregs[REG_RBX] = (long) &sp[idx_uc_link];
-  ucp->uc_mcontext.gregs[REG_RSP] = (long) sp;
+  ucp->uc_mcontext.gregs[REG_RBX] = (long int) &sp[idx_uc_link];
+  ucp->uc_mcontext.gregs[REG_RSP] = (long int) sp;
 
   /* Setup stack.  */
-  sp[0] = (long) &__start_context;
-  sp[idx_uc_link] = (long) ucp->uc_link;
+  sp[0] = (unsigned long int) &__start_context;
+  sp[idx_uc_link] = (unsigned long int) ucp->uc_link;
 
   va_start (ap, argc);
   /* Handle arguments.  */