diff options
author | Alexander Graf <agraf@suse.de> | 2012-08-14 12:53:18 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-08-15 19:43:15 +0200 |
commit | a5b71725c7067f6805eb30ff8e03dce3b6bf7a53 (patch) | |
tree | 45fcc7a8dba04e29c49c20df95d813d5a8995279 /savevm.c | |
parent | f28359d8e8fc64192450a72164b89d06cc3f781d (diff) | |
download | qemu-a5b71725c7067f6805eb30ff8e03dce3b6bf7a53.zip qemu-a5b71725c7067f6805eb30ff8e03dce3b6bf7a53.tar.gz qemu-a5b71725c7067f6805eb30ff8e03dce3b6bf7a53.tar.bz2 |
xbzrle: fix compilation on ppc32
When compiling the xbzrle code on my ppc32 user space, I hit the following
gcc compiler warning (treated as an error):
cc1: warnings being treated as errors
savevm.c: In function ‘xbzrle_encode_buffer’:
savevm.c:2476: error: overflow in implicit constant conversion
Fix this by making the cast explicit, rather than implicit.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'savevm.c')
-rw-r--r-- | savevm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2473,7 +2473,7 @@ int xbzrle_encode_buffer(uint8_t *old_buf, uint8_t *new_buf, int slen, /* word at a time for speed, use of 32-bit long okay */ if (!res) { /* truncation to 32-bit long okay */ - long mask = 0x0101010101010101ULL; + long mask = (long)0x0101010101010101ULL; while (i < slen) { xor = *(long *)(old_buf + i) ^ *(long *)(new_buf + i); if ((xor - mask) & ~xor & (mask << 7)) { |