From: Stefan Hajnoczi Date: Wed, 10 Jan 2018 20:25:53 +0000 (+0000) Subject: tracetool: report error on foo() instead of foo(void) X-Git-Tag: v2.12.0-rc0~124^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24f4d3d3aeabf83445839099d6d66cbb3089c37a;p=thirdparty%2Fqemu.git 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 Reviewed-by: Eric Blake Message-id: 20180110202553.31889-4-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi --- diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index e3685bd0ca5..1a9733da9a1 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -75,6 +75,8 @@ class Arguments: 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