[Spice-devel] [spice-server 4/9] syntax-check: Remove unneeded cast of free() argument

Pavel Grunt pgrunt at redhat.com
Thu Oct 27 14:20:11 UTC 2016


mjpeg-encoder.c: In function 'mjpeg_encoder_encode_frame':
mjpeg-encoder.c:972:27: error: passing argument 1 of 'buffer-
>base.free' from incompatible pointer type [-Werror=incompatible-
pointer-types]
         buffer->base.free(buffer);

Declaration of the free function is:
static void mjpeg_video_buffer_free(VideoBuffer *video_buffer)

On Thu, 2016-10-27 at 16:12 +0200, Christophe Fergeau wrote:
> ---
>  server/mjpeg-encoder.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/mjpeg-encoder.c b/server/mjpeg-encoder.c
> index d95c645..2e22edf 100644
> --- a/server/mjpeg-encoder.c
> +++ b/server/mjpeg-encoder.c
> @@ -969,7 +969,7 @@ static int
> mjpeg_encoder_encode_frame(VideoEncoder *video_encoder,
>      }
>  
>      if (ret != VIDEO_ENCODER_FRAME_ENCODE_DONE) {
> -        buffer->base.free((VideoBuffer*)buffer);
> +        buffer->base.free(buffer);
>      }
>      return ret;
>  }


More information about the Spice-devel mailing list