Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The problem is that too many of these macros are written in ways that cause static analysis to complain about things like unreachable empty statements. Simply converting all of them to the `do { ... } while(0)` pattern resolves a lot of the lint warnings. However doing that to one of the most frequently used macros, `SFMTXRETURN`, introduces a different lint warning about a branch statement as the last statement of a loop. So instead of treating these macros as function calls which need to be followed by a semicolon just drop the semicolon where they macro is used. After all, most of them cannot be turned into functions precisely because they do things, such as `return`, that have to be done in the context where they are used. This eliminates 100 lines of warnings from `bin/lint all`. P.S., I consider `return` statements within macro definitions an anti-pattern; i.e., bad practice. But that is something I'm not going to change now as this is already quite invasive.
- Loading branch information
1 parent
e39a895
commit f08d851
Showing
51 changed files
with
446 additions
and
470 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.