Skip to content

Commit a7ffaf1

Browse files
Updated C33010
Acrolinx fixes
1 parent 8fc5cf1 commit a7ffaf1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/code-quality/c33010.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This warning is triggered if an enum is both used as an index into an array and
1818

1919
## Remarks
2020

21-
Code using enumerated types as indexes for arrays will often check for the upper bound in order to ensure the index is not out of range. Because an enum variable is signed by default, it can have a negative value. If it is used as an index into an array of values or an array of function pointers, a negative value can allow arbitrary memory to be read, used, or even executed.
21+
Code using enumerated types as indexes for arrays will often check for the upper bound in order to ensure the index isn't out of range. Because an enum variable is signed by default, it can have a negative value. A negative array index can allow arbitrary memory to be read, used, or even executed.
2222

2323
Code analysis name: UNCHECKED_LOWER_BOUND_FOR_ENUMINDEX
2424

@@ -49,7 +49,7 @@ void foo(Index idx, PFN(&functions)[5])
4949
}
5050
```
5151
52-
These following code remediates this warning by checking the lower bound as well to ensure `idx` is not negative:
52+
The following code remediates this warning by checking the lower bound as well to ensure `idx` isn't negative:
5353
5454
```cpp
5555
typedef void (*PFN)();

0 commit comments

Comments
 (0)