* Get rid of a few unsigned/signed warnings
@ 2002-12-28 7:09 Andreas Jaeger
2002-12-28 12:41 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Jaeger @ 2002-12-28 7:09 UTC (permalink / raw)
To: GNU libc hacker
The appended patch gets rid of these warnings:
../sysdeps/generic/dl-cache.c:222: warning: comparison between signed and unsigned
../sysdeps/generic/readelflib.c:103: warning: comparison between signed and unsigned
../sysdeps/generic/readelflib.c:148: warning: comparison between signed and unsigned
Ok to commit?
Andreas
2002-12-28 Andreas Jaeger <aj@suse.de>
* sysdeps/generic/readelflib.c (process_elf_file): Cast value to
avoid warning.
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Likewise.
============================================================
Index: sysdeps/generic/dl-cache.c
--- sysdeps/generic/dl-cache.c 6 Feb 2002 14:14:34 -0000 1.41
+++ sysdeps/generic/dl-cache.c 28 Dec 2002 14:59:02 -0000
@@ -219,7 +219,7 @@ _dl_load_cache_lookup (const char *name)
hwcap = &GL(dl_hwcap);
platform = _dl_string_platform (GL(dl_platform));
- if (platform != -1)
+ if (platform != (uint64_t)-1)
platform = 1ULL << platform;
/* Only accept hwcap if it's for the right platform. */
============================================================
Index: sysdeps/generic/readelflib.c
--- sysdeps/generic/readelflib.c 29 Aug 2002 20:39:24 -0000 1.8
+++ sysdeps/generic/readelflib.c 28 Dec 2002 14:59:02 -0000
@@ -100,7 +100,7 @@ process_elf_file (const char *file_name,
switch (segment->p_type)
{
case PT_LOAD:
- if (loadaddr == -1)
+ if (loadaddr == (ElfW(Addr))-1)
loadaddr = segment->p_vaddr - segment->p_offset;
break;
@@ -145,7 +145,7 @@ process_elf_file (const char *file_name,
}
}
- if (loadaddr == -1)
+ if (loadaddr == (ElfW(Addr))-1)
{
/* Very strange. */
loadaddr = 0;
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Get rid of a few unsigned/signed warnings
2002-12-28 7:09 Get rid of a few unsigned/signed warnings Andreas Jaeger
@ 2002-12-28 12:41 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2002-12-28 12:41 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: GNU libc hacker
Andreas Jaeger wrote:
> 2002-12-28 Andreas Jaeger <aj@suse.de>
>
> * sysdeps/generic/readelflib.c (process_elf_file): Cast value to
> avoid warning.
> * sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Likewise.
I've applied the patch. Thanks,
--
--------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-28 20:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-28 7:09 Get rid of a few unsigned/signed warnings Andreas Jaeger
2002-12-28 12:41 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).