clang 3.7.0 on x86_64 warns about the following:
target-i386/monitor.c:38:22: warning: shifting a negative signed value is
undefined [-Wshift-negative-value]
addr |= -1LL << 48;
~~~~ ^
Signed-off-by: Stefan Hajnoczi <[email protected]>
---
target-i386/monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/monitor.c b/target-i386/monitor.c
index aac6b1b..6f5c280 100644
--- a/target-i386/monitor.c
+++ b/target-i386/monitor.c
@@ -35,7 +35,7 @@ static void print_pte(Monitor *mon, hwaddr addr,
{
#ifdef TARGET_X86_64
if (addr & (1ULL << 47)) {
- addr |= -1LL << 48;
+ addr |= ~0ULL << 48;
}
#endif
monitor_printf(mon, TARGET_FMT_plx ": " TARGET_FMT_plx
--
2.5.0