From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KvFos-0002Dc-9W for qemu-devel@nongnu.org; Wed, 29 Oct 2008 14:31:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KvFor-0002D7-Kc for qemu-devel@nongnu.org; Wed, 29 Oct 2008 14:31:01 -0400 Received: from [199.232.76.173] (port=59249 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KvFoq-0002D1-3r for qemu-devel@nongnu.org; Wed, 29 Oct 2008 14:31:00 -0400 Received: from an-out-0708.google.com ([209.85.132.240]:44288) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KvFop-0006bu-Tp for qemu-devel@nongnu.org; Wed, 29 Oct 2008 14:31:00 -0400 Received: by an-out-0708.google.com with SMTP id d18so13019and.130 for ; Wed, 29 Oct 2008 11:30:58 -0700 (PDT) Message-ID: Date: Wed, 29 Oct 2008 20:30:58 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH 1/4] Implement "info chardev" command. In-Reply-To: <490842E3.2060200@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1225198518-16529-1-git-send-email-kraxel@redhat.com> <1225198518-16529-2-git-send-email-kraxel@redhat.com> <49076EF9.8040009@redhat.com> <490842E3.2060200@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On 10/29/08, Gerd Hoffmann wrote: > Gerd Hoffmann wrote: > > Hi, > > > >>> @@ -55,9 +56,12 @@ struct CharDriverState { > >>> void *opaque; > >>> int focus; > >>> QEMUBH *bh; > >>> + char *label; > >>> + char *filename; > >> I think you should add 'const' to both above. > > > > Will do. > > > Well, no. filename is modified by (some) qemu_chr_open_*() functions, > so it's pointless IMHO. label never ever changes after the first > assignment and it works fine except for this warning: > > passing arg 1 of `qemu_free' discards qualifiers from pointer target type. > > Hmm. I don't feel like casting that one away. And constifying the > qemu_free() argument doesn't look sane either. Other suggestions? Drop 'const'? Sorry for the trouble.