Skip to content

Commit 2d10ef8

Browse files
committed
Fix some Acrolinx complaints
1 parent 7e2e845 commit 2d10ef8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/code-quality/c6200.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ ms.assetid: bbeb159b-4e97-4317-9a07-bb83cd03069a
88
---
99
# Warning C6200
1010

11-
> Index '*index*' is out of valid index range '*min*' to '*max*' for non-stack buffer '*parameter-name*'
11+
> Index '*index*' is out of valid index range '*min*' to '*max*' for nonstack buffer '*parameter-name*'
1212
13-
This warning indicates that an integer offset into the specified non-stack array exceeds the maximum bounds of that array, causing undefined behavior and potentially crashes.
13+
This warning indicates that an integer offset into the specified nonstack array exceeds the maximum bounds of that array, causing undefined behavior and potentially crashes.
1414

1515
## Remarks
1616

@@ -50,9 +50,9 @@ void f()
5050

5151
## Heuristics
5252

53-
Code analysis cannot always prove whether an array index is in range. This can be particularly true when the index is computed from a complex expression, including those that use call into other functions. In these cases, code analysis may fall back on other clues to determine the range an array index expression may fall into.
53+
Code analysis can't always prove whether an array index is in range. This can happen, for example, when the index is computed from a complex expression, including those expressions that use call into other functions. In these cases, code analysis may fall back on other clues to determine the range an array index expression may fall into.
5454

55-
For example, consider the following function which uses `rand()` in index calculations as a standin for a function call that code analysis cannot analyze:
55+
For example, consider the following function that uses `rand()` in index calculations as a stand-in for a function call that code analysis can't analyze:
5656

5757
```cpp
5858
#include <stdlib.h>
@@ -70,4 +70,4 @@ void f()
7070
}
7171
```
7272

73-
Code analysis does not warn with just `rand()` because it does not have any information about its return value. On the other hand, `rand() % 15` and `rand() % 14` provide hints as to the range of the return value of `rand()` and code analysis can use that information to determine that the index is out of bounds in the first case but not the second.
73+
Code analysis doesn't warn with just `rand()` because it doesn't have any information about its return value. On the other hand, `rand() % 15` and `rand() % 14` provide hints as to the range of the return value of `rand()` and code analysis can use that information to determine that the index is out of bounds in the first case but not the second.

0 commit comments

Comments
 (0)