This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Warning fix: memcpy.c


Hi,

The patch below fixes this warning:

..
/users/rtems/src/rpms/BUILD/rtems-4.7-arm-rtems4.7-gcc-newlib-gcc4.0.0newlib1.13.0/build/gcc/xgcc -B/users/rtems/src/rpms/BUILD/rtems-4.7-arm-rtems4.7-gcc-newlib-gcc4.0.0newlib1.13.0/build/gcc/ -nostdinc -B/users/rtems/src/rpms/BUILD/rtems-4.7-arm-rtems4.7-gcc-newlib-gcc4.0.0newlib1.13.0/build/arm-rtems4.7/thumb/newlib/ -isystem /users/rtems/src/rpms/BUILD/rtems-4.7-arm-rtems4.7-gcc-newlib-gcc4.0.0newlib1.13.0/build/arm-rtems4.7/thumb/newlib/targ-include -isystem /users/rtems/src/rpms/BUILD/rtems-4.7-arm-rtems4.7-gcc-newlib-gcc4.0.0newlib1.13.0/gcc-4.0.0/newlib/libc/include -B/opt/rtems-4.7/arm-rtems4.7/bin/ -B/opt/rtems-4.7/arm-rtems4.7/lib/ -isystem /opt/rtems-4.7/arm-rtems4.7/include -isystem /opt/rtems-4.7/arm-rtems4.7/sys-include  -mthumb -DPACKAGE=\"newlib\" -DVERSION=\"1.13.0\"  -I. -I../../../../../../gcc-4.0.0/newlib/libc/string  -O2 -DHAVE_GETTIMEOFDAY -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DHAVE_FCNTL -fno-builtin      -O2 -g -O2   -mthumb -c ../../../../../../gcc-4.0.0/newlib/libc/string/memcmp.c
../../../../../../gcc-4.0.0/newlib/libc/string/memcmp.c: In function 'memcmp':
../../../../../../gcc-4.0.0/newlib/libc/string/memcmp.c:98: warning: pointer targets in assignment differ in signedness
../../../../../../gcc-4.0.0/newlib/libc/string/memcmp.c:99: warning: pointer targets in assignment differ in signedness

Ralf


Index: newlib/libc/string/memcmp.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/memcmp.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 memcmp.c
--- newlib/libc/string/memcmp.c	17 Feb 2000 19:39:48 -0000	1.1.1.1
+++ newlib/libc/string/memcmp.c	5 Mar 2005 06:33:06 -0000
@@ -95,8 +95,8 @@
 
       /* check m mod LBLOCKSIZE remaining characters */
 
-      s1 = (char*)a1;
-      s2 = (char*)a2;
+      s1 = (unsigned char*)a1;
+      s2 = (unsigned char*)a2;
     }
 
   while (n--)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]