[Top][All Lists]

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

Re: [Qemu-trivial] [PATCH] memory: give name every AddressSpace

From: Paolo Bonzini
Subject: Re: [Qemu-trivial] [PATCH] memory: give name every AddressSpace
Date: Mon, 29 Apr 2013 11:25:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 29/04/2013 10:21, Alexey Kardashevskiy ha scritto:
>>> >> +    g_free((void *)as->name);
>> > 
>> > No cast here.
> ?
>   CC    ppc64-softmmu/memory.o
> /home/alexey/pcipassthru/qemu-impreza/memory.c: In function
> 'address_space_destroy':
> /home/alexey/pcipassthru/qemu-impreza/memory.c:1626:5: warning: passing
> argument 1 of 'g_free' discards 'const' qualifier from pointer target type
> [enabled by default]
>      g_free(/*(void *)*/as->name);
>      ^

Please remove the const from as->name instead.  Since you are strdup-ing
it, and the field is meant to be private to memory.c anyway, you do not
need protection against changing it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]