Commit a8b7063b1fe6de729ee8dac55ea59d321fae9ee1
1 parent
c7085da7
Avoid a gcc 3 format warning
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Showing
2 changed files
with
4 additions
and
12 deletions
hw/spitz.c
| ... | ... | @@ -24,11 +24,7 @@ |
| 24 | 24 | #include "boards.h" |
| 25 | 25 | |
| 26 | 26 | #undef REG_FMT |
| 27 | -#if TARGET_PHYS_ADDR_BITS == 32 | |
| 28 | -#define REG_FMT "0x%02x" | |
| 29 | -#else | |
| 30 | 27 | #define REG_FMT "0x%02lx" |
| 31 | -#endif | |
| 32 | 28 | |
| 33 | 29 | /* Spitz Flash */ |
| 34 | 30 | #define FLASH_BASE 0x0c000000 |
| ... | ... | @@ -87,7 +83,7 @@ static uint32_t sl_readb(void *opaque, target_phys_addr_t addr) |
| 87 | 83 | return ecc_digest(&s->ecc, nand_getio(s->nand)); |
| 88 | 84 | |
| 89 | 85 | default: |
| 90 | - zaurus_printf("Bad register offset " REG_FMT "\n", addr); | |
| 86 | + zaurus_printf("Bad register offset " REG_FMT "\n", (unsigned long)addr); | |
| 91 | 87 | } |
| 92 | 88 | return 0; |
| 93 | 89 | } |
| ... | ... | @@ -129,7 +125,7 @@ static void sl_writeb(void *opaque, target_phys_addr_t addr, |
| 129 | 125 | break; |
| 130 | 126 | |
| 131 | 127 | default: |
| 132 | - zaurus_printf("Bad register offset " REG_FMT "\n", addr); | |
| 128 | + zaurus_printf("Bad register offset " REG_FMT "\n", (unsigned long)addr); | |
| 133 | 129 | } |
| 134 | 130 | } |
| 135 | 131 | ... | ... |
hw/zaurus.c
| ... | ... | @@ -21,11 +21,7 @@ |
| 21 | 21 | #include "sharpsl.h" |
| 22 | 22 | |
| 23 | 23 | #undef REG_FMT |
| 24 | -#if TARGET_PHYS_ADDR_BITS == 32 | |
| 25 | -#define REG_FMT "0x%02x" | |
| 26 | -#else | |
| 27 | 24 | #define REG_FMT "0x%02lx" |
| 28 | -#endif | |
| 29 | 25 | |
| 30 | 26 | /* SCOOP devices */ |
| 31 | 27 | |
| ... | ... | @@ -98,7 +94,7 @@ static uint32_t scoop_readb(void *opaque, target_phys_addr_t addr) |
| 98 | 94 | case SCOOP_GPRR: |
| 99 | 95 | return s->gpio_level; |
| 100 | 96 | default: |
| 101 | - zaurus_printf("Bad register offset " REG_FMT "\n", addr); | |
| 97 | + zaurus_printf("Bad register offset " REG_FMT "\n", (unsigned long)addr); | |
| 102 | 98 | } |
| 103 | 99 | |
| 104 | 100 | return 0; |
| ... | ... | @@ -143,7 +139,7 @@ static void scoop_writeb(void *opaque, target_phys_addr_t addr, uint32_t value) |
| 143 | 139 | scoop_gpio_handler_update(s); |
| 144 | 140 | break; |
| 145 | 141 | default: |
| 146 | - zaurus_printf("Bad register offset " REG_FMT "\n", addr); | |
| 142 | + zaurus_printf("Bad register offset " REG_FMT "\n", (unsigned long)addr); | |
| 147 | 143 | } |
| 148 | 144 | } |
| 149 | 145 | ... | ... |