[Spice-devel] [PATCH spice-streaming-agent] Eliminate signed/unsigned warning

Frediano Ziglio fziglio at redhat.com
Thu Apr 19 13:24:23 UTC 2018


From: Christophe de Dinechin <dinechin at redhat.com>

Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 src/mjpeg-fallback.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp
index 68c282f..e3de291 100644
--- a/src/mjpeg-fallback.cpp
+++ b/src/mjpeg-fallback.cpp
@@ -47,7 +47,7 @@ private:
     std::vector<uint8_t> frame;
 
     // last frame sizes
-    uint32_t last_width = ~0u, last_height = ~0u;
+    int last_width = -1, last_height = -1;
     // last time before capture
     uint64_t last_time = 0;
 };
@@ -70,7 +70,7 @@ MjpegFrameCapture::~MjpegFrameCapture()
 void MjpegFrameCapture::Reset()
 {
     frame.clear();
-    last_width = last_height = ~0u;
+    last_width = last_height = -1;
 }
 
 FrameInfo MjpegFrameCapture::CaptureFrame()
-- 
2.14.3



More information about the Spice-devel mailing list