You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Consider using `\**function_name_1*` instead of `\**function_name_2*`. Reason: `\**reason*`
13
13
14
-
This warning occurs when that you use a function that is semantically equivalent to an alternative, preferred function call.
14
+
This warning occurs when you use a function that is semantically equivalent to an alternative, preferred function call.
15
15
16
16
## Remarks
17
17
18
-
This is a general warning message; the annotation `__drv_preferredFunction` was used (possibly with a conditional a`__drv_when`() annotation) to flag a bad coding practice.
18
+
C28159 is a general warning message; the annotation `__drv_preferredFunction` was used (possibly with a conditional `__drv_when`() annotation) to flag a bad coding practice.
19
19
20
20
Code analysis name: USE_OTHER_FUNCTION
21
21
22
22
## Example
23
23
24
-
The following code example generates this warning. This issue is due to the use of `OemToChar`, which does not validate the buffer size:
24
+
The following code example generates this warning. This issue is due to the use of `OemToChar`, which doesn't validate the buffer size:
25
25
26
26
```cpp
27
27
char buff[MAX_PATH];
28
28
OemToChar(buff, input); // If strlen(input) > MAX_PATH, this call leads to buffer overrun
29
29
```
30
30
31
-
The following code example avoids this warning by using the recommended alternative `OemToCharBuff`, which takes in the destination buffer size and limits the copy appropriatly:
31
+
The following code example avoids this warning by using the recommended alternative `OemToCharBuff`, which takes in the destination buffer size and limits the copy appropriately:
0 commit comments