diff options
author | Randy Dunlap <[email protected]> | 2020-02-25 21:09:19 -0800 |
---|---|---|
committer | Paul E. McKenney <[email protected]> | 2020-04-27 11:05:13 -0700 |
commit | be44ae62431196ac2a55198c0855028fff3ccfb4 (patch) | |
tree | 4cc904ccdefee4d8037f1024fdab18268424d7eb /tools/perf/scripts/python/export-to-postgresql.py | |
parent | c9527bebb017b891d1a2bbb96217bd5225488a0e (diff) |
locktorture.c: Fix if-statement empty body warnings
When using -Wextra, gcc complains about torture_preempt_schedule()
when its definition is empty (i.e., when CONFIG_PREEMPTION is not
set/enabled). Fix these warnings by adding an empty do-while block
for that macro when CONFIG_PREEMPTION is not set.
Fixes these build warnings:
../kernel/locking/locktorture.c:119:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
../kernel/locking/locktorture.c:166:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
../kernel/locking/locktorture.c:337:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
../kernel/locking/locktorture.c:490:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
../kernel/locking/locktorture.c:528:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
../kernel/locking/locktorture.c:553:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
I have verified that there is no object code change (with gcc 7.5.0).
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: Josh Triplett <[email protected]>
Signed-off-by: "Paul E. McKenney" <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions