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

Christophe Fergeau cfergeau at redhat.com
Thu Apr 26 09:52:09 UTC 2018


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Mon, Apr 23, 2018 at 03:25:39PM +0100, Frediano Ziglio wrote:
> From: Christophe de Dinechin <dinechin at redhat.com>
> 
> Currently -Wsign-compare is disabled by default in the default settings
> (m4/spice-compile-warnings.m4).
> However is good and not that expensive to remove this warning.
> 
> 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(-)
> 
> Changes since v1:
> - update comment
> 
> diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp
> index 605a4b3..b64762c 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
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180426/3d3f728c/attachment.sig>


More information about the Spice-devel mailing list