1
0
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:
smlng 2018-09-21 10:36:57 +02:00
parent 59e299635b
commit 3f811c44db

View File

@ -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);