mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-02 21:32:52 +00:00
tracetool: report error on foo() instead of foo(void)
C functions with no arguments must be declared foo(void) instead of foo(). The tracetool argument list parser has never accepted an empty argument list. This patch adds a clear error message for this error case. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180110202553.31889-4-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
6e497fa1b1
commit
24f4d3d3ae
1 changed files with 2 additions and 0 deletions
|
@ -75,6 +75,8 @@ def build(arg_str):
|
|||
res = []
|
||||
for arg in arg_str.split(","):
|
||||
arg = arg.strip()
|
||||
if not arg:
|
||||
raise ValueError("Empty argument (did you forget to use 'void'?)")
|
||||
if arg == 'void':
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in a new issue