[Spice-devel] [PATCH 04/10] syntax-check: Don't cast free() arguments

Christophe Fergeau cfergeau at redhat.com
Thu Oct 8 01:05:00 PDT 2015


On Thu, Oct 08, 2015 at 07:41:47AM +0200, Victor Toso wrote:
> Hi,
> 
> On Wed, Oct 07, 2015 at 06:45:11PM +0200, Christophe Fergeau wrote:
> > ---
> >  server/red_replay_qxl.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/server/red_replay_qxl.c b/server/red_replay_qxl.c
> > index ad1a8fd..7dcfc16 100644
> > --- a/server/red_replay_qxl.c
> > +++ b/server/red_replay_qxl.c
> > @@ -439,9 +439,9 @@ static void red_replay_image_free(SpiceReplay *replay, QXLPHYSICAL p, uint32_t f
> >  
> >      switch (qxl->descriptor.type) {
> >      case SPICE_IMAGE_TYPE_BITMAP:
> > -        free((void*)qxl->bitmap.palette);
> > +        free(qxl->bitmap.palette);
> 
> I'm getting -Werror=int-conversion here (gcc)
> 
> <snip>
> red_replay_qxl.c: In function 'red_replay_image_free':
> red_replay_qxl.c:442:14: error: passing argument 1 of 'free' makes pointer from integer without a cast [-Werror=int-conversion]
>          free(qxl->bitmap.palette);

Ah right, should have been more careful ;) I'll exclude this file from
the tests.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20151008/1fa70d36/attachment.sig>


More information about the Spice-devel mailing list