Skip to content

Commit 2809dd9

Browse files
authored
Merge pull request #4563 from MicrosoftDocs/main
10/5 AM Publishing
2 parents 17d8649 + aa9d138 commit 2809dd9

22 files changed

+622
-539
lines changed

docs/code-quality/c1250.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
description: "Learn more about: C1250"
3-
title: C1250
4-
ms.date: 11/04/2016
2+
description: "Learn more about: Fatal error C1250"
3+
title: Fatal error C1250
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C1250"]
6+
f1_keywords: ["C1250", "FATALERROR_UnableToLoadPlugin"]
77
helpviewer_keywords: ["C1250"]
88
ms.assetid: 3f2385d7-e0d6-4574-8cea-342e82d0aea4
99
---
10-
# C1250
10+
# Fatal error C1250
1111

12-
> warning C1250: Unable to load plug-in.
12+
> Unable to load plug-in '*plugin-name*'.
1313
14-
The Code Analysis tool reports this warning when there is an internal error in the plugin, not in the code being analyzed.
14+
The Code Analysis tool reports this error when there's an internal error in the plugin, not in the code being analyzed.

docs/code-quality/c1251.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
2-
description: "Learn more about: C1251"
3-
title: C1251
4-
ms.date: 11/04/2016
2+
description: "Learn more about: Fatal error C1251"
3+
title: Fatal error C1251
4+
ms.date: 10/04/2022
55
ms.topic: reference
6+
f1_keywords: ["C1251", "FATALERROR_UnableToLoadModel"]
7+
helpviewer_keywords: ["C1251"]
68
ms.assetid: 0b46e0a5-c290-48d8-ba4e-f526ae68993b
79
---
8-
# C1251
10+
# Fatal error C1251
911

10-
> warning C1251: Unable to load models.
12+
> Unable to load models.
1113
12-
The Code Analysis tool reports this warning when there is an internal error in the model file, not in the code being analyzed.
14+
The Code Analysis tool reports this error when there's an internal error in the model file, not in the code being analyzed.

docs/code-quality/c1252.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
description: "Learn more about: C1252"
3-
title: C1252
4-
ms.date: 06/01/2022
2+
description: "Learn more about: Fatal error C1252"
3+
title: Fatal error C1252
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C1252"]
6+
f1_keywords: ["C1252", "FATALERROR_CircularDependency"]
77
helpviewer_keywords: ["C1252"]
88
ms.assetid: e88bf199-890d-4582-bb5c-c1238797145b
99
---
10-
# C1252
10+
# Fatal error C1252
1111

12-
> warning C1252: Circular or missing dependency between plugins: '*plugin-name*' requires GUID '*globally-unique-identifier*'
12+
> Circular or missing dependency between plugins: '*plugin-name*' requires GUID '*globally-unique-identifier*'
1313
14-
The Code Analysis tool reports this warning when there's an internal error in the plugin dependencies. It's not caused by an issue in the code being analyzed.
14+
The Code Analysis tool reports this error when there's an internal error in the plugin dependencies. It's not caused by an issue in the code being analyzed.
1515

1616
In some cases, it's possible to work around this issue by disabling the **Enable Code Analysis on Build** property. To disable this build property, open the Property pages dialog for your project. In the **Solution Explorer** window, right-click on the project (not the solution) and select **Properties** in the shortcut menu. Set the **Configuration** to **All Configurations** and the **Platform** to **All Platforms**. Open the **Configuration Properties** > **Code Analysis** > **General** property page. Modify the **Enable Code Analysis on Build** property to **No**. Choose **OK** to save your changes, and then save your project files. Rebuild your project to verify that the issue no longer occurs.
1717

docs/code-quality/c1253.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
description: "Learn more about: C1253"
3-
title: C1253
4-
ms.date: 11/04/2016
2+
description: "Learn more about: Fatal error C1253"
3+
title: Fatal error C1253
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C1253"]
6+
f1_keywords: ["C1253", "FATALERROR_UnableToLoadModelFile"]
77
helpviewer_keywords: ["C1253"]
88
ms.assetid: 21a4062f-fde8-40e5-8dbd-6f892926d3d2
99
---
10-
# C1253
10+
# Fatal error C1253
1111

12-
> warning C1253: Unable to load model file.
12+
> Unable to load model file.
1313
14-
The Code Analysis tool reports this warning when there is an internal error in the model file, not in the code being analyzed.
14+
The Code Analysis tool reports this error when there's an internal error in the model file, not in the code being analyzed.

docs/code-quality/c1254.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
description: "Learn more about: C1254"
3-
title: C1254
4-
ms.date: 11/04/2016
2+
description: "Learn more about: Fatal error C1254"
3+
title: Fatal error C1254
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C1254"]
6+
f1_keywords: ["C1254", "FATALERROR_PluginVersionMismatch"]
77
helpviewer_keywords: ["C1254"]
88
ms.assetid: cb1377cf-869e-432d-941f-71f77134f97a
99
---
10-
# C1254
10+
# Fatal error C1254
1111

12-
> warning C1254: Plugin version mismatch : version doesn't match the version of the PREfast driver
12+
> Plugin version mismatch: '*module*' version '*version-number*' doesn't match the version '*version-number*' of the PREfast driver
1313
14-
The Code Analysis tool reports this warning when there is an internal error with the plugin version, not in the code being analyzed.
14+
The Code Analysis tool reports this error when there's an internal error with the plugin version, not in the code being analyzed.

docs/code-quality/c1255.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
description: "Learn more about: C1255"
3-
title: C1255
4-
ms.date: 11/04/2016
2+
description: "Learn more about: Fatal error C1255"
3+
title: Fatal error C1255
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C1255"]
6+
f1_keywords: ["C1255", "FATALERROR_PCHSyncLost"]
77
helpviewer_keywords: ["C1255"]
88
ms.assetid: a97da6bd-06dc-42bf-9158-0de1ebb90d4a
99
---
10-
# C1255
10+
# Fatal error C1255
1111

12-
> warning C1255: PCH data for plugin has incorrect length.
12+
> PCH data for plugin '*plugin-name*' has incorrect length.
1313
14-
The Code Analysis tool reports this warning when there is an internal error in the tool, not in the code being analyzed.
14+
The Code Analysis tool reports this error when there's an internal error in the tool, not in the code being analyzed.

docs/code-quality/c1256.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
description: "Learn more about: C1256"
3-
title: C1256
4-
ms.date: 11/04/2016
2+
description: "Learn more about: Fatal error C1256"
3+
title: Fatal error C1256
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C1256"]
6+
f1_keywords: ["C1256", "FATALERROR_PCHInconsistent"]
77
helpviewer_keywords: ["C1256"]
88
ms.assetid: 4d65e495-f9d9-435c-ba51-1cf5b4cc2309
99
---
10-
# C1256
10+
# Fatal error C1256
1111

12-
> warning C1256: PCH must be both written and read.
12+
> '*plugin-name*': PCH must be both written and read.
1313
14-
The Code Analysis tool reports this warning when there is an internal error in the tool, not in the code being analyzed.
14+
The Code Analysis tool reports this error when there's an internal error in the tool, not in the code being analyzed.

docs/code-quality/c1257.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
description: "Learn more about: C1257"
3-
title: C1257
4-
ms.date: 11/04/2016
2+
description: "Learn more about: Fatal error C1257"
3+
title: Fatal error C1257
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C1257"]
6+
f1_keywords: ["C1257", "FATALERROR_InitFailure"]
77
helpviewer_keywords: ["C1257"]
88
ms.assetid: 38d3ec05-01ba-42b3-aac6-077e92bf2ded
99
---
10-
# C1257
10+
# Fatal error C1257
1111

12-
> warning C1257: Plugin Initialization Failure.
12+
> '*Plugin-name*': Initialization Failure.
1313
14-
The Code Analysis tool reports this warning when there is an internal error in the plugin, not in the code being analyzed.
14+
The Code Analysis tool reports this error when there's an internal error in the plugin, not in the code being analyzed.

docs/code-quality/c1258.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
description: "Learn more about: Fatal error C1258"
3+
title: Fatal error C1258
4+
ms.date: 10/04/2022
5+
ms.topic: reference
6+
f1_keywords: ["C1258", "FATALERROR_SaveToXmlFailed"]
7+
helpviewer_keywords: ["C1258"]
8+
---
9+
# Fatal error C1258
10+
11+
> Failed to save XML Log file '*filename*'. *Message*.
12+
13+
The Code Analysis tool reports this error when there's an internal error in the plugin, not in the code being analyzed.

docs/code-quality/c1259.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
description: "Learn more about: Fatal error C1259"
3+
title: Fatal error C1259
4+
ms.date: 10/04/2022
5+
ms.topic: reference
6+
f1_keywords: ["C1259", "FATALERROR_FatalError"]
7+
helpviewer_keywords: ["C1259"]
8+
---
9+
# Fatal error C1259
10+
11+
> A fatal error was issued by a plugin.
12+
13+
The Code Analysis tool reports this error when there's an internal error in the plugin, not in the code being analyzed.

docs/code-quality/c1260.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
description: "Learn more about: Fatal error C1260"
3+
title: Fatal error C1260
4+
ms.date: 10/04/2022
5+
ms.topic: reference
6+
f1_keywords: ["C1260", "FATALERROR_DuplicateId"]
7+
helpviewer_keywords: ["C1260"]
8+
---
9+
# Fatal error C1260
10+
11+
> The plugins '*plugin-1*' and '*plugin-2*' share the same id. It is not supported to load the same plugin twice.
12+
13+
The Code Analysis tool reports this error when there's an internal error in the plugin, not in the code being analyzed.

docs/code-quality/c6001.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
---
2-
description: "Learn more about: C6001"
3-
title: C6001
4-
ms.date: 11/04/2016
2+
description: "Learn more about: Warning C6001"
3+
title: Warning C6001
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C6001"]
6+
f1_keywords: ["C6001", "USING_UNINIT_VAR", "__WARNING_USING_UNINIT_VAR"]
77
helpviewer_keywords: ["C6001"]
88
ms.assetid: 55e779f1-7295-48f7-8ce1-b43898b36cd8
99
---
10-
# C6001
10+
# Warning C6001
1111

12-
> warning C6001: using uninitialized memory \<variable>
12+
> Using uninitialized memory '*variable*'.
1313
14-
This warning is reported when an uninitialized local variable is used before it is assigned a value. This could lead to unpredictable results. You should always initialize variables before use.
14+
## Remarks
15+
16+
This warning is reported when an uninitialized local variable is used before it's assigned a value. This usage could lead to unpredictable results. You should always initialize variables before use.
17+
18+
Code analysis name: `USING_UNINIT_VAR`
1519

1620
## Example
1721

docs/code-quality/c6011.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
---
2-
title: C6011
2+
title: Warning C6011
33
description: "Reference for Visual Studio C++ code analysis warning C6011."
4-
ms.date: 03/23/2020
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C6011"]
6+
f1_keywords: ["C6011", "DEREF_NULL_PTR", "__WARNING_DEREF_NULL_PTR"]
77
helpviewer_keywords: ["C6011"]
88
ms.assetid: 54b7bc2b-b8f5-43fc-a9a3-8189b03f249a
99
---
10-
# C6011
10+
# Warning C6011
1111

12-
> warning C6011: dereferencing NULL pointer \<name>
12+
> Dereferencing NULL pointer '*pointer-name*'.
13+
14+
## Remarks
1315

1416
This warning indicates that your code dereferences a potentially null pointer. If the pointer value is invalid, the result is undefined. To resolve the issue, validate the pointer before use.
1517

18+
Code analysis name: `DEREF_NULL_PTR`
19+
1620
## Example
1721

1822
The following code generates this warning because a call to `malloc` might return null if insufficient memory is available:
@@ -59,12 +63,12 @@ void f([Pre(Null=Yes)] char* pc)
5963
}
6064
```
6165
62-
The careless use of `malloc` and `free` leads to memory leaks and exceptions. To minimize these kinds of leaks and exception problems altogether, avoid allocating raw memory yourself. Instead, use the mechanisms provided by the C++ Standard Library (STL). These include [shared_ptr](../standard-library/shared-ptr-class.md), [unique_ptr](../standard-library/unique-ptr-class.md), and [vector](../standard-library/vector.md). For more information, see [Smart Pointers](../cpp/smart-pointers-modern-cpp.md) and [C++ Standard Library](../standard-library/cpp-standard-library-reference.md).
66+
The careless use of `malloc` and `free` leads to memory leaks and exceptions. To minimize these kinds of leaks and exception problems altogether, avoid allocating raw memory yourself. Instead, use the mechanisms provided by the C++ Standard Library (STL). These include [`shared_ptr`](../standard-library/shared-ptr-class.md), [`unique_ptr`](../standard-library/unique-ptr-class.md), and [`vector`](../standard-library/vector.md). For more information, see [Smart Pointers](../cpp/smart-pointers-modern-cpp.md) and [C++ Standard Library](../standard-library/cpp-standard-library-reference.md).
6367
6468
## See also
6569
6670
- [Using SAL Annotations to reduce code defects](using-sal-annotations-to-reduce-c-cpp-code-defects.md)
67-
- [NULL](../c-runtime-library/null-crt.md)
71+
- [`NULL`](../c-runtime-library/null-crt.md)
6872
- [Indirection and Address-of Operators](../c-language/indirection-and-address-of-operators.md)
69-
- [malloc](../c-runtime-library/reference/malloc.md)
70-
- [free](../c-runtime-library/reference/free.md)
73+
- [`malloc`](../c-runtime-library/reference/malloc.md)
74+
- [`free`](../c-runtime-library/reference/free.md)

docs/code-quality/c6014.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ ms.assetid: ef76ec88-74d2-4a3b-b6fe-4b0851ab3372
99
---
1010
# Warning C6014
1111

12-
> warning C6014: Leaking memory.
12+
> Leaking memory '*pointer-name*'.
1313
1414
This warning indicates that the specified pointer points to allocated memory or some other allocated resource that hasn't been freed.
1515

1616
## Remarks
1717

1818
The analyzer checks for this condition only when the `_Analysis_mode_(_Analysis_local_leak_checks_)` SAL annotation is specified. By default, this annotation is specified for Windows kernel mode (driver) code. For more information about SAL annotations, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).
1919

20+
This warning is reported for both memory and resource leaks when the resource is commonly *aliased* to another location. Memory is aliased when a pointer to the memory escapes the function by using an `_Out_` parameter annotation, global variable, or return value. This warning can be reported on function exit if the argument is annotated that its release is expected.
21+
22+
Code Analysis won't recognize the actual implementation of a memory allocator (involving address arithmetic) and won't recognize that memory is allocated (although many wrappers will be recognized). In this case, the analyzer doesn't recognize that the memory was allocated and issues this warning. To suppress the false positive, use a `#pragma warning(disable: 6014)` directive on the line that precedes the opening brace `{` of the function body.
23+
24+
Code analysis name: `MEMORY_LEAK`
25+
2026
## Examples
2127

2228
The following code generates warning C6014:
@@ -76,10 +82,6 @@ int main( )
7682
}
7783
```
7884

79-
This warning is reported for both memory and resource leaks when the resource is commonly *aliased* to another location. Memory is aliased when a pointer to the memory escapes the function by using an `_Out_` parameter annotation, global variable, or return value. This warning can be reported on function exit if the argument is annotated that its release is expected.
80-
81-
Code Analysis won't recognize the actual implementation of a memory allocator (involving address arithmetic) and won't recognize that memory is allocated (although many wrappers will be recognized). In this case, the analyzer doesn't recognize that the memory was allocated and issues this warning. To suppress the false positive, use a `#pragma` directive on the line that precedes the opening brace `{` of the function body.
82-
8385
To avoid these kinds of potential leaks altogether, use the mechanisms that are provided by the C++ Standard Library (STL). These include [`shared_ptr`](../standard-library/shared-ptr-class.md), [`unique_ptr`](../standard-library/unique-ptr-class.md), and containers such as [`vector`](../standard-library/vector.md). For more information, see [Smart pointers](../cpp/smart-pointers-modern-cpp.md) and [C++ Standard Library](../standard-library/cpp-standard-library-reference.md).
8486

8587
```cpp

docs/code-quality/c6029.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
---
2-
description: "Learn more about: C6029"
3-
title: C6029
4-
ms.date: 11/04/2016
2+
description: "Learn more about: Warning C6029"
3+
title: Warning C6029
4+
ms.date: 10/04/2022
55
ms.topic: reference
6-
f1_keywords: ["C6029"]
6+
f1_keywords: ["C6029", "USING_TAINTED_DATA", "__WARNING_USING_TAINTED_DATA"]
77
helpviewer_keywords: ["C6029"]
88
ms.assetid: 07f89261-1b77-4597-9f34-12ce5d569b60
99
---
10-
# C6029
10+
# Warning C6029
1111

12-
> warning C6029: possible buffer overrun in call to \<function>: use of unchecked value
12+
> Possible buffer overrun in call to '*function*': use of unchecked value
1313
14-
This warning indicates that a function that takes a buffer and a size is being passed a unchecked size. The data read-in from some external source has not been verified to see whether it is smaller than the buffer size. An attacker might intentionally specify a much larger than expected value for the size, which will lead to a buffer overrun.
14+
## Remarks
1515

16-
Generally, whenever you read data from an untrusted external source, make sure to verify it for validity. It is usually appropriate to verify the size to make sure it is in the expected range.
16+
This warning indicates that a function that takes a buffer and a size is being passed an unchecked size. The data read-in from some external source hasn't been verified to see whether it's smaller than the buffer size. An attacker might intentionally specify a much larger than expected value for the size, which will lead to a buffer overrun.
17+
18+
Generally, whenever you read data from an untrusted external source, make sure to verify it for validity. It's appropriate to verify the size to make sure it's in the expected range.
19+
20+
Code analysis name: `USING_TAINTED_DATA`
1721

1822
## Example
1923

20-
The following code generates this warning by calling the annotated function [ReadFile](/windows/desktop/api/fileapi/nf-fileapi-readfile) two times. After the first call, the Post attribute property marks the second parameter value untrusted. Therefore, passing an untrusted value in the second call to `ReadFile` generates this warning as shown in the following code:
24+
The following code generates this warning by calling the annotated function [`ReadFile`](/windows/desktop/api/fileapi/nf-fileapi-readfile) two times. After the first call, the Post attribute property marks the second parameter value untrusted. Therefore, passing an untrusted value in the second call to `ReadFile` generates this warning as shown in the following code:
2125

2226
```cpp
2327

0 commit comments

Comments
 (0)