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
> warning C28159: Consider using another function instead.
16
12
> Consider using `\**function_name_1*` instead of `\**function_name_2*`. Reason: `\**reason*`
17
-
This warning is reported for Drivers is suggesting that you use a preferred function call that is semantically equivalent to the function that the driver is calling. 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.
13
+
18
14
This warning occurs when that you use a function that is semantically equivalent to an alternative, preferred function call.
The following code example generates this warning:
29
24
The following code example generates this warning. This issue is due to the use of `OemToChar`, which does not validate the buffer size:
30
25
31
26
```cpp
32
27
char buff[MAX_PATH];
33
28
OemToChar(buff, input); // If strlen(input) > MAX_PATH, this call leads to buffer overrun
34
29
```
35
30
36
-
The following code example avoids this warning:
37
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:
0 commit comments