* [Qemu-devel] [PATCH 03/15] linux-user: fix types in a comparison
@ 2010-09-10 20:58 Blue Swirl
0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2010-09-10 20:58 UTC (permalink / raw)
To: qemu-devel
-1ul is unsigned long, which does not necessarily match abi_ulong
type.
Fix by using abi_long instead.
This also avoids a warning with GCC flag -Wtype-limits.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
linux-user/mmap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index e10a6ef..035dfbd 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -342,7 +342,7 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
munmap(ptr, size);
/* ENOMEM if we checked the whole of the target address space. */
- if (addr == -1ul) {
+ if (addr == (abi_ulong)-1) {
return (abi_ulong)-1;
} else if (addr == 0) {
if (wrapped) {
--
1.6.2.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] [PATCH 03/15] linux-user: fix types in a comparison
@ 2010-09-05 15:05 Blue Swirl
0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2010-09-05 15:05 UTC (permalink / raw)
To: qemu-devel
-1ul is unsigned long, which does not necessarily match abi_ulong
type.
Fix by using abi_long instead.
This also fixes a warning with GCC flag -Wtype-limits.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
linux-user/mmap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index e10a6ef..035dfbd 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -342,7 +342,7 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
munmap(ptr, size);
/* ENOMEM if we checked the whole of the target address space. */
- if (addr == -1ul) {
+ if (addr == (abi_ulong)-1) {
return (abi_ulong)-1;
} else if (addr == 0) {
if (wrapped) {
--
1.6.2.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-10 20:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-10 20:58 [Qemu-devel] [PATCH 03/15] linux-user: fix types in a comparison Blue Swirl
-- strict thread matches above, loose matches on Subject: below --
2010-09-05 15:05 Blue Swirl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.