diff --git a/tests/scripts/generate_test_code.py b/tests/scripts/generate_test_code.py index 3ff7a41d9..45fb1f574 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