This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
errors in current CVS
- From: "Alfred M. Szmidt" <ams at kemisten dot nu>
- To: libc-alpha at sources dot redhat dot com
- Date: Sat, 20 Sep 2003 12:13:13 +0200 (MEST)
- Subject: errors in current CVS
I got this while compiling libc from CVS on GNU/Hurd,
make[2]: Entering directory `/home/ams/src/libc/malloc'
gcc malloc.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -Wno-parentheses -mpreferred-stack-boundary=2 -DDEFAULT_TOP_PAD=131072 -I../include -I. -I/obj/devel/ams/libc/malloc -I.. -I../libio -I../hurd -I/obj/devel/ams/libc/hurd/ -I../mach -I/obj/devel/ams/libc/mach/ -I/obj/devel/ams/libc -I../sysdeps/i386/elf -I../sysdeps/mach/hurd/i386 -I../sysdeps/mach/hurd -I../sysdeps/gnu -I../sysdeps/unix/bsd/bsd4.4 -I../sysdeps/unix/mman -I../sysdeps/mach/i386 -I../sysdeps/mach -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/unix/bsd -I../sysdeps/unix/common -I../sysdeps/unix/inet -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -D_LIBC_REENTRANT -include ../include/libc-symbols.h -o /obj/devel/ams/libc/malloc/malloc.o -MD -MP -MF /obj/devel/ams/libc/malloc/malloc.o.dt
In file included from malloc.c:2316:
arena.c:508: warning: `used' attribute ignored
arena.c:508: warning: `used' attribute ignored
arena.c:508: warning: `used' attribute ignored
malloc.c: In function `_int_free':
malloc.c:4139: `uintptr_t' undeclared (first use in this function)
malloc.c:4139: (Each undeclared identifier is reported only once
malloc.c:4139: for each function it appears in.)
malloc.c:4139: parse error before "p"
[...snip of about 200 lines of errors...]
I'm not sure what change caused this, it's either the one from
2003-09-12 by Ulrich, or the one from 2003-09-08 by Wolfram Gloger.
The following patch fixes the above error (its a simple typo).
2003-09-19 Alfred M. Szmidt <ams@kemisten.nu>
* malloc/malloc.c (_int_free): Fix cast typo.
Index: malloc/malloc.c
--- malloc/malloc.c
+++ malloc/malloc.c
@@ -4136,7 +4136,7 @@
allocator never wrapps around at the end of the address space.
Therefore we can exclude some size values which might appear
here by accident or by "design" from some intruder. */
- if (__builtin_expect ((uintptr_t) p > (uintptr_t) -size, 0))
+ if (__builtin_expect ((mchunkptr) p > (mchunkptr) -size, 0))
{
if (check_action & 1)
{