diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-02-08 08:35:52 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-02-08 11:21:46 +0100 |
commit | d2b02a3d7b0ed88ab73e05197169ba795f308a8a (patch) | |
tree | e7fad2f2e3fb865c126cb775e53a5b990ed13d5a /.travis.yml | |
parent | 343b29a651429eb57bf5acf95a14e2ff1773ab88 (diff) |
Remove do{ } while(0) wrapper around error macros.
As pointed out by Faless, a do{ } while(0) wrapper around a continue or
break just ends the do{ } while(0) loop. The do{ } while(0) loop exists
to enable the macro to be used as a function which requires a semicolon.
The alternative approach is to use an if(1) { } else ((void)0) wrapper.
Since the macro already has an if(unlikely(m_cond)) { } this patch simply
adds the else ((void)0) to this if statement instead.
For consistency all the macros have been updated in the same way, and
trailing else warnings corrected. However, the wrappers around ERR_PRINT
and WARN_PRINT were removed, because they generated too many ambiguous
trailing else warnings. They are also single line macros so a wrapper is
not needed.
Diffstat (limited to '.travis.yml')
0 files changed, 0 insertions, 0 deletions