Re: [PATCH 1/2] Fix keymap used to talk with QEMU

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

 



On 08/26/2011 04:41 AM, Daniel P. Berrange wrote:
+extern int (*codeOffsetVerify(void)) [verify_true (ARRAY_CARDINALITY(codeOffset) == VIR_KEYCODE_SET_LAST)]; \

Why the trailing backslash?

Also, open-coding this verify is dangerous; gcc warnings have
changed over time, rendering certain verification styles that were
once safe into something that trips up -Werror.  It is safer (and
shorter!) to let gnulib worry about gcc quirks, by changing this
line to just be:

verify(ARRAY_CARDINALITY(codeOffset) == VIR_KEYCODE_SET_LAST);

Yeah it was a stupid cut+paste from src/util/util.h where we had to
open-code it for the enums, because the gnulib macro resulted in
clashing symbols when used more than one.

Wow. That line dates from 2008, prior to my gnulib fixes to the verify module to make multiple verify() in one file work without triggering gcc complaints (by use of gcc's __COUNTER__ preprocessor magic). Patch coming up soon.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]