Skip to content

Commit ea34a4a

Browse files
committed
Update manual
1 parent 59a60fa commit ea34a4a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

man/manual.md

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

657-
In this example there are 2 lines with code and 1 suppression comment. The suppression comment only applies to 1 line: `a = b + c;`.
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+
671+
In the example below 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() {
660674
a = b + c; // cppcheck-suppress abc

0 commit comments

Comments
 (0)