From: Paolo Bonzini <pbonzini@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PULL 2/8] ui: convert the SDL2 frontend to keycodemapdb
Date: Thu, 1 Feb 2018 13:10:34 -0500 [thread overview]
Message-ID: <1f7763b2-44ec-0663-d721-7a71782592a6@redhat.com> (raw)
In-Reply-To: <20180201175444.GY22810@redhat.com>
On 01/02/2018 12:54, Daniel P. Berrangé wrote:
> On Thu, Feb 01, 2018 at 12:37:26PM -0500, Paolo Bonzini wrote:
>> On 01/02/2018 12:35, Daniel P. Berrangé wrote:
>>> On Thu, Feb 01, 2018 at 12:28:02PM -0500, Paolo Bonzini wrote:
>>>> On 25/01/2018 09:32, Gerd Hoffmann wrote:
>>>>> --- a/include/ui/input.h
>>>>> +++ b/include/ui/input.h
>>>>> @@ -80,4 +80,7 @@ extern const guint16 qemu_input_map_qnum_to_qcode[];
>>>>> extern const guint qemu_input_map_qcode_to_linux_len;
>>>>> extern const guint16 qemu_input_map_qcode_to_linux[];
>>>>
>>>> Is there any reason to use the length variables rather than just
>>>> ARRAY_SIZE()? Coverity isn't able to see through the initializer and
>>>> incorrectly complains that
>>>
>>> ARRAY_SIZE can only be used if you can see the array variable
>>> initialization, but this is the header file so all we have is
>>> the extern declaration and thus the array size is unknown from
>>> the places that need to use the _len variable.
>>>
>>> We do in fact initalize the _len variable based on the ARRAY_SIZE,
>>> but that's in the .c files.
>>
>> Would it make sense for keymap-gen to also generate the header file, so
>> that we can use an "extern const guint x[NNN]" declaration rather
>> instead of "x[]"?
>
> I could probably add such a feature to it....
I could too if I know it will be accepted! I'll send you a patch.
Thanks,
Paolo
next prev parent reply other threads:[~2018-02-01 18:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 14:32 [Qemu-devel] [PULL 0/8] Ui 20180125 patches Gerd Hoffmann
2018-01-25 14:32 ` [Qemu-devel] [PULL 1/8] ui: avoid sign extension using client width/height Gerd Hoffmann
2018-01-25 14:32 ` [Qemu-devel] [PULL 2/8] ui: convert the SDL2 frontend to keycodemapdb Gerd Hoffmann
2018-02-01 17:28 ` Paolo Bonzini
2018-02-01 17:35 ` Daniel P. Berrangé
2018-02-01 17:37 ` Paolo Bonzini
2018-02-01 17:54 ` Daniel P. Berrangé
2018-02-01 18:10 ` Paolo Bonzini [this message]
2018-02-01 18:13 ` Daniel P. Berrangé
2018-01-25 14:32 ` [Qemu-devel] [PULL 3/8] ui: convert GTK and SDL1 frontends " Gerd Hoffmann
2018-01-25 14:32 ` [Qemu-devel] [PULL 4/8] ui: add fix for GTK Pause key handling on Win32 Gerd Hoffmann
2018-01-25 14:32 ` [Qemu-devel] [PULL 5/8] ui: ignore hardware keycode 255 on win32 Gerd Hoffmann
2018-01-25 14:32 ` [Qemu-devel] [PULL 6/8] ui: deprecate use of SDL 1.2 in favour of 2.0 series Gerd Hoffmann
2018-01-25 14:32 ` [Qemu-devel] [PULL 7/8] sdl: use ctrl-alt-g as grab hotkey Gerd Hoffmann
2018-01-25 14:32 ` [Qemu-devel] [PULL 8/8] sdl: reorganize -no-frame support Gerd Hoffmann
2018-01-26 10:08 ` [Qemu-devel] [PULL 0/8] Ui 20180125 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f7763b2-44ec-0663-d721-7a71782592a6@redhat.com \
--to=pbonzini@redhat.com \
--cc=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).