Skip to contentSkip to conversation

hw/alpha: Fix compiler warning (integer constant is too large)

PATCH Applied Stefan Weil 3 participants 3 messages Sep 29, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/alpha: Fix compiler warning (integer constant is too large)

Quoted 1 line

From buildbot default_i386_rhel61:

CC alpha-softmmu/hw/alpha/typhoon.o
hw/alpha/typhoon.c: In function 'typhoon_translate_iommu':
hw/alpha/typhoon.c:703: warning: integer constant is too large for 'long' type hw/alpha/typhoon.c:703: warning: integer constant is too large for 'long' type

---

I used lower case 'ull' because the rest of the code writes it that way although I personally prefer 0xfffffffffffULL to 0xfffffffffffull.

Stefan

 hw/alpha/typhoon.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/alpha/typhoon.c +1 -1
index aac9a32..59e1bb8 100644
@@ -700,7 +700,7 @@ static IOMMUTLBEntry typhoon_translate_iommu(MemoryRegion *iommu, hwaddr addr)
             }
         }
 
-        if (addr >= 0x80000000000 && addr <= 0xfffffffffff) {
+        if (addr >= 0x80000000000ull && addr <= 0xfffffffffffull) {
             /* Check the fourth window for DAC enable and window enable.  */
             if ((pchip->win[3].wba & 0x80000000001ull) == 0x80000000001ull) {
                 uint64_t pte_addr;
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Stefan Weil
Quoted 1 line

From buildbot default_i386_rhel61:

CC alpha-softmmu/hw/alpha/typhoon.o
hw/alpha/typhoon.c: In function 'typhoon_translate_iommu':
hw/alpha/typhoon.c:703: warning: integer constant is too large for 'long' type hw/alpha/typhoon.c:703: warning: integer constant is too large for 'long' type

---

r~

#2 lore raw
In reply to Stefan Weil
Quoted 6 lines · Stefan Weil

From buildbot default_i386_rhel61:

CC alpha-softmmu/hw/alpha/typhoon.o
hw/alpha/typhoon.c: In function 'typhoon_translate_iommu':
hw/alpha/typhoon.c:703: warning: integer constant is too large for 'long' type hw/alpha/typhoon.c:703: warning: integer constant is too large for 'long' type

Thanks, applied to the trivial patches queue.

Quoted 2 lines

I used lower case 'ull' because the rest of the code writes it that way although I personally prefer 0xfffffffffffULL to 0xfffffffffffull.

Yea, "full" looks a bit odd here :)

/mjt