From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWkLJ-0004wL-Jy for qemu-devel@nongnu.org; Mon, 29 Apr 2013 05:25:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWkLE-0007kA-I4 for qemu-devel@nongnu.org; Mon, 29 Apr 2013 05:25:53 -0400 Message-ID: <517E3C7C.3080604@redhat.com> Date: Mon, 29 Apr 2013 11:25:16 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <517BC1F2.70405@redhat.com> <1367201460-28594-1-git-send-email-aik@ozlabs.ru> <517E2C5C.8000700@redhat.com> <517E2D74.3070804@ozlabs.ru> In-Reply-To: <517E2D74.3070804@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] memory: give name every AddressSpace List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, David Gibson 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. Paolo