[PATCH] Remove a warning compiling under Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Windows long is always 32 bit so under x64 the cast from pointer to
"unsigned long" cause a warning.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 common/quic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/quic.c b/common/quic.c
index f014a2a..5b00d65 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -1073,7 +1073,7 @@ static int init_encoder(Encoder *encoder, QuicUsrContext *usr)
 
 static int encoder_reste(Encoder *encoder, uint32_t *io_ptr, uint32_t *io_ptr_end)
 {
-    spice_assert(((unsigned long)io_ptr % 4) == ((unsigned long)io_ptr_end % 4));
+    spice_assert(((uintptr_t)io_ptr % 4) == ((uintptr_t)io_ptr_end % 4));
     spice_assert(io_ptr <= io_ptr_end);
 
     encoder->rgb_state.waitcnt = 0;
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]