Skip to content

Commit 1cded5c

Browse files
committed
Update manual
1 parent 59a60fa commit 1cded5c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

man/manual.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,20 @@ Or at the same line as the code:
654654
arr[10] = 0; // cppcheck-suppress arrayIndexOutOfBounds
655655
}
656656

657+
The suppression comment and the line of code may be separated by additional comments or empty lines:
658+
659+
void f() {
660+
char arr[5];
661+
662+
// cppcheck-suppress arrayIndexOutOfBounds
663+
664+
arr[10] = 0;
665+
666+
// cppcheck-suppress arrayIndexOutOfBounds
667+
// Set the tenth element of arr to zero
668+
arr[10] = 0;
669+
}
670+
657671
In this example there are 2 lines with code and 1 suppression comment. The suppression comment only applies to 1 line: `a = b + c;`.
658672

659673
void f() {

0 commit comments

Comments
 (0)