mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qapi: Reject blank 'if' conditions in addition to empty ones
"'if': 'COND'" generates "#if COND". We reject empty COND because it won't compile. Blank COND won't compile any better, so reject that, too. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190914153506.2151-12-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
887a2069f7
commit
c2c7065e17
3 changed files with 5 additions and 4 deletions
|
@ -1 +1 @@
|
|||
tests/qapi-schema/bad-if-list.json:2: 'if' condition '' makes no sense
|
||||
tests/qapi-schema/bad-if-list.json:2: 'if' condition ' ' makes no sense
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# check invalid 'if' content
|
||||
{ 'struct': 'TestIfStruct', 'data': { 'foo': 'int' },
|
||||
'if': ['foo', ''] }
|
||||
'if': ['foo', ' '] }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue