From 7776141a16b49ef9131d6352e0f957019e4cdfdd Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 18 Jun 2018 17:51:40 +0200 Subject: [PATCH] Don't generate lines with only whitespace --- tests/scripts/generate_test_code.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/scripts/generate_test_code.py b/tests/scripts/generate_test_code.py index 3ff7a41d98..45fb1f5749 100755 --- a/tests/scripts/generate_test_code.py +++ b/tests/scripts/generate_test_code.py @@ -136,11 +136,11 @@ def gen_function_wrapper(name, locals, args_dispatch): wrapper = ''' void {name}_wrapper( void ** params ) {{ - {unused_params} -{locals} +{unused_params}{locals} {name}( {args} ); }} -'''.format(name=name, unused_params='(void)params;' if len(args_dispatch) == 0 else '', +'''.format(name=name, + unused_params='' if args_dispatch else ' (void) params;\n', args=', '.join(args_dispatch), locals=locals) return wrapper