Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Minor updates to C6063
  • Loading branch information
Rastaban committed Feb 22, 2023
commit 0f7f51bd81b3c38fa6890a8cb6ac3cd4fd79fa0a
11 changes: 5 additions & 6 deletions docs/code-quality/c6063.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
description: "Learn more about: Warning C6063"
title: Warning C6063
ms.date: 10/04/2022
ms.date: 2/22/2023
f1_keywords: ["C6063", "MISSING_STRING_ARGUMENT_TO_FORMAT_FUNCTION", "__WARNING_MISSING_STRING_ARGUMENT_TO_FORMAT_FUNCTION"]
helpviewer_keywords: ["C6063"]
ms.assetid: 9a4b0684-6c13-4242-a1ab-97980b6cfdc4
---
# Warning C6063

Expand All @@ -21,18 +20,18 @@ Code analysis name: `MISSING_STRING_ARGUMENT_TO_FORMAT_FUNCTION`
The following code generates this warning:

```cpp
#include <string.h>
#include <stdio.h>
void f( )
{
char buff[15];
sprintf(buff, "%s %s", "Hello, World!");
}
```

To correct this warning, provide the required arguments as shown in the following code:
To correct this warning, remove the unused format specifier or provide the required arguments as shown in the following code:

```cpp
#include <string.h>
#include <stdio.h>
void f( )
{
char buff[15];
Expand All @@ -43,7 +42,7 @@ void f( )
The following code corrects this warning using safe string manipulation function:

```cpp
#include <string.h>
#include <stdio.h>
void f( )
{
char buff[15];
Expand Down