Skip to content

Commit 26510c1

Browse files
authored
Revise Warning C6064 documentation
Updated the date and improved wording for clarity.
1 parent 407ad80 commit 26510c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/code-quality/c6064.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: Warning C6064"
33
title: Warning C6064
4-
ms.date: 2/07/2023
4+
ms.date: 9/29/2025
55
f1_keywords: ["C6064", "MISSING_INTEGER_ARGUMENT_TO_FORMAT_FUNCTION", "__WARNING_MISSING_INTEGER_ARGUMENT_TO_FORMAT_FUNCTION"]
66
helpviewer_keywords: ["C6064"]
77
---
@@ -13,13 +13,13 @@ This warning indicates that the code doesn't provide enough arguments to match a
1313

1414
## Remarks
1515

16-
Supplying too few arguments to a format function leads to undefined behavior, because the function attempts to read values that were never passed. Possible consequences include incorrect output, crashes, or even security vulnerabilities such as information leaks. To ensure stability and safety, always match the number and types of arguments to the format specifiers in the string.
16+
Supplying too few arguments to a format function leads to undefined behavior because the function attempts to read values that aren't passed. Possible consequences include incorrect output, crashes, or even security vulnerabilities such as information leaks. To ensure stability and safety, always match the number and types of arguments to the format specifiers in the string.
1717

1818
Code analysis name: `MISSING_INTEGER_ARGUMENT_TO_FORMAT_FUNCTION`
1919

2020
## Example
2121

22-
The following code generates this warning because it uses an incorrect number of arguments in the call to `sprintf_s` and the missing argument is an integer. If the unsafe function `sprintf` was used instead of the safer variant `sprintf_s`, this code would likely cause a stack overflow instead of just an unexpected output:
22+
The following code generates this warning by using an incorrect number of arguments in the call to `sprintf_s` and the missing argument is an integer. If the unsafe function `sprintf` was used instead of the safer variant `sprintf_s`, this code would likely cause a stack overflow instead of just unexpected output:
2323

2424
```cpp
2525
void f()
@@ -34,7 +34,7 @@ void f()
3434
}
3535
```
3636

37-
To correct this warning, specify missing arguments or adjust the format string. In this example, we add the missing integer value.
37+
To correct this warning, specify the missing arguments or adjust the format string. In this example, we add the missing integer value.
3838

3939
```cpp
4040
void f()

0 commit comments

Comments
 (0)