diff options
author | Richard Henderson <rth@twiddle.net> | 2010-03-26 09:16:21 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2010-03-26 09:16:21 -0700 |
commit | b1c1949e60e7c61bcd9f40f712d07494596491b2 (patch) | |
tree | 84648ee4af35a882c7885d9cc6634d3c1639458b /sysdeps | |
parent | 07f9ca32a96891c90cb80aee780c8cee2c9504e4 (diff) | |
download | glibc-b1c1949e60e7c61bcd9f40f712d07494596491b2.tar.gz glibc-b1c1949e60e7c61bcd9f40f712d07494596491b2.tar.xz glibc-b1c1949e60e7c61bcd9f40f712d07494596491b2.zip |
Don't take the address of a void object.
GCC 4.5 warns about "extern void _end; &end;". Use char[] instead, as that also doesn't fall foul of a target's .sdata optimizations. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/dl-sysdep.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c index 08ae9aa86d..34e8808928 100644 --- a/sysdeps/unix/sysv/linux/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/dl-sysdep.c @@ -47,12 +47,12 @@ frob_brk (void) Later Linux kernels have changed this behavior so that the initial break value is rounded up to the page boundary before we start. */ - extern void *__curbrk attribute_hidden; - extern void _end attribute_hidden; - void *const endpage = (void *) 0 + (((__curbrk - (void *) 0) + extern char *__curbrk attribute_hidden; + extern char _end[] attribute_hidden; + char *const endpage = (void *) 0 + (((__curbrk - (char *) 0) + GLRO(dl_pagesize) - 1) & -GLRO(dl_pagesize)); - if (__builtin_expect (__curbrk >= &_end && __curbrk < endpage, 0)) + if (__builtin_expect (__curbrk >= _end && __curbrk < endpage, 0)) __brk (endpage); #endif } |