qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/4] ARRAY_SIZE fixups
@ 2017-01-19 21:07 Michael S. Tsirkin
  2017-01-19 21:07 ` [Qemu-devel] [PATCH v3 1/4] compiler: drop ; after BUILD_BUG_ON Michael S. Tsirkin
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Michael S. Tsirkin @ 2017-01-19 21:07 UTC (permalink / raw)
  To: qemu-devel

Turns out virtio kept using ARRAY_SIZE on fields which stopped
being arrays, this was noticed by a coverity scan.
I fixed this up, this patchset fixes up the ARRAY_SIZE macro so that this
bug does not reappear in any other place.

changes from v2:
    - dropped the merged virtio patch
    - whitespace changes
    - rewrote BUG_ON macros from an array to a struct for portability

Michael S. Tsirkin (4):
  compiler: drop ; after BUILD_BUG_ON
  compiler: rework BUG_ON using a struct
  compiler: expression version of QEMU_BUILD_BUG_ON
  ARRAY_SIZE: check that argument is an array

 include/qemu/compiler.h | 11 +++++++++--
 include/qemu/osdep.h    |  9 ++++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)

-- 
MST

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2017-01-20 18:33 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-19 21:07 [Qemu-devel] [PATCH v3 0/4] ARRAY_SIZE fixups Michael S. Tsirkin
2017-01-19 21:07 ` [Qemu-devel] [PATCH v3 1/4] compiler: drop ; after BUILD_BUG_ON Michael S. Tsirkin
2017-01-19 21:22   ` Eric Blake
2017-01-19 21:07 ` [Qemu-devel] [PATCH v3 2/4] compiler: rework BUG_ON using a struct Michael S. Tsirkin
2017-01-19 21:26   ` Eric Blake
2017-01-20  7:44     ` Markus Armbruster
2017-01-20  7:42   ` Markus Armbruster
2017-01-20 16:57     ` Michael S. Tsirkin
2017-01-20 17:09       ` Paolo Bonzini
2017-01-20 17:45         ` Michael S. Tsirkin
2017-01-20 18:33           ` Markus Armbruster
2017-01-20  9:41   ` Dr. David Alan Gilbert
2017-01-20 14:36     ` Eric Blake
2017-01-20 14:53       ` Dr. David Alan Gilbert
2017-01-19 21:07 ` [Qemu-devel] [PATCH v3 3/4] compiler: expression version of QEMU_BUILD_BUG_ON Michael S. Tsirkin
2017-01-19 21:28   ` Eric Blake
2017-01-19 21:07 ` [Qemu-devel] [PATCH v3 4/4] ARRAY_SIZE: check that argument is an array Michael S. Tsirkin
2017-01-19 21:59   ` Eric Blake
2017-01-19 22:11     ` Michael S. Tsirkin
2017-01-19 23:00       ` Eric Blake
2017-01-20  7:34         ` Markus Armbruster
2017-01-20 12:20           ` Paolo Bonzini
2017-01-20  7:45 ` [Qemu-devel] [PATCH v3 0/4] ARRAY_SIZE fixups Markus Armbruster
2017-01-20 14:57 ` no-reply
2017-01-20 15:15 ` no-reply

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).