From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UX05r-0004oN-Sc for qemu-devel@nongnu.org; Mon, 29 Apr 2013 22:15:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UX05q-0001C5-UT for qemu-devel@nongnu.org; Mon, 29 Apr 2013 22:14:59 -0400 Received: from mail-da0-x22d.google.com ([2607:f8b0:400e:c00::22d]:42487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UX05q-0001BR-NT for qemu-devel@nongnu.org; Mon, 29 Apr 2013 22:14:58 -0400 Received: by mail-da0-f45.google.com with SMTP id v40so20949dad.18 for ; Mon, 29 Apr 2013 19:14:56 -0700 (PDT) Message-ID: <517F2919.8000402@ozlabs.ru> Date: Tue, 30 Apr 2013 12:14:49 +1000 From: Alexey Kardashevskiy 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> <517E3C7C.3080604@redhat.com> In-Reply-To: <517E3C7C.3080604@redhat.com> 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: Paolo Bonzini Cc: qemu-devel@nongnu.org, David Gibson On 04/29/2013 07:25 PM, Paolo Bonzini wrote: > 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. ok, no prob, I'll repost the patch. In meanwhile, could you please update docs/memory.txt and include AddressSpace and MemoryListener things in it as it is not absolutely clear what is what and for what purpose? The current version of the doc is too old. Thanks. -- Alexey