From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kv8pP-0003SW-4F for qemu-devel@nongnu.org; Wed, 29 Oct 2008 07:03:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kv8pN-0003QX-3T for qemu-devel@nongnu.org; Wed, 29 Oct 2008 07:03:06 -0400 Received: from [199.232.76.173] (port=40801 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kv8pM-0003QO-QL for qemu-devel@nongnu.org; Wed, 29 Oct 2008 07:03:04 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51123) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kv8pM-0000cu-9X for qemu-devel@nongnu.org; Wed, 29 Oct 2008 07:03:04 -0400 Message-ID: <490842E3.2060200@redhat.com> Date: Wed, 29 Oct 2008 12:02:59 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/4] Implement "info chardev" command. References: <1225198518-16529-1-git-send-email-kraxel@redhat.com> <1225198518-16529-2-git-send-email-kraxel@redhat.com> <49076EF9.8040009@redhat.com> In-Reply-To: <49076EF9.8040009@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl 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? cheers, Gerd