qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/4] Implement "info chardev" command.


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 1/4] Implement "info chardev" command.
Date: Wed, 29 Oct 2008 12:02:59 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

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




reply via email to

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