qlit: Change compound literals to initializers
commitd5cd8fbf130312bea91823c41de87d55818d599b
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 25 Aug 2017 10:59:03 +0000 (25 12:59 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 4 Sep 2017 11:09:11 +0000 (4 13:09 +0200)
tree6ff2b4737d5091971453779208cc6cc58cd0c98d
parent082696e767db4d2b6c8c8c233d28291b83fc2b21
qlit: Change compound literals to initializers

The QLIT_QFOO() macros expand into compound literals.  Sadly, gcc
doesn't recognizes these as constant expressions (clang does), which
makes the macros useless for initializing objects with static storage
duration.

There is a gcc bug about it:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71713

Change the macros to expand into initializers.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170825105913.4060-5-marcandre.lureau@redhat.com>
[Commit message improved]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
include/qapi/qmp/qlit.h