mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cppcheck: extend cppcheck README example
Extend the cppcheck suppression example to show that each suppression should have a reason describing the intentional suppression of a cppcheck warning or error.
This commit is contained in:
parent
59e299635b
commit
3f811c44db
6
dist/tools/cppcheck/README.md
vendored
6
dist/tools/cppcheck/README.md
vendored
@ -33,7 +33,9 @@ you want to get warnings about "unusedStructMembers" run the script with the
|
||||
|
||||
You should read the code carefully. While cppcheck certainly produces
|
||||
valuable information, it can also warn about code that is actually OK.
|
||||
If this happens, you can add an "inline suppression" like this:
|
||||
If this happens, you can add an "inline suppression" and briefly state
|
||||
why this is required like this:
|
||||
|
||||
/* cppcheck-suppress passedByValue */
|
||||
/* cppcheck-suppress passedByValue
|
||||
* (reason: <add rationale on why it is necessary to suppress this here>) */
|
||||
timex_t timex_add(const timex_t a, const timex_t b);
|
||||
|
Loading…
Reference in New Issue
Block a user