Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 1 addition & 2 deletions docs/code-quality/c6401.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: "Warning C6401"
description: "Learn more about: Warning C6401"
title: Warning C6401
ms.date: 11/04/2016
f1_keywords: ["C6401", "DEFAULT_LOCALE_CONSTANT_STRING_COMPARISON", "__WARNING_DEFAULT_LOCALE_CONSTANT_STRING_COMPARISON"]
helpviewer_keywords: ["C6401"]
ms.assetid: d57b1c94-57a3-4d4b-a7de-8b9ffbac3ebe
---
# Warning C6401

Expand Down
2 changes: 1 addition & 1 deletion docs/code-quality/c6411.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Warning C6411
title: "Warning C6411"
description: "Learn more about: Warning C6411"
ms.date: 11/04/2016
f1_keywords: ["C6411", "POTENTIAL_READ_OVERRUN"]
Expand Down
2 changes: 1 addition & 1 deletion docs/code-quality/c6412.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Warning C6412
title: "Warning C6412"
description: "Learn more about: Warning C6412"
ms.date: 11/04/2016
f1_keywords: ["C6412", "POTENTIAL_WRITE_OVERRUN"]
Expand Down
9 changes: 4 additions & 5 deletions docs/code-quality/c6500.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: "Warning C6500"
description: "Learn more about: Warning C6500"
title: Warning C6500
ms.date: 11/04/2016
f1_keywords: ["C6500", "INVALID_ATTRIBUTE_PROPERTY", "__WARNING_INVALID_ATTRIBUTE_PROPERTY"]
helpviewer_keywords: ["C6500"]
ms.assetid: bfc61ec1-8ac5-4465-a23c-91418fbc4552
---
# Warning C6500

> Invalid annotation: value for '*name*' property is invalid

## Remarks

> [!NOTE]
> This warning occurs only in code that is using a deprecated version of the source-code annotation language (SAL). We recommend that you port your code to use the latest version of SAL. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).

## Remarks

This warning indicates that a property value used in the annotation isn't valid. For example, it can occur if an incorrect level of dereference is used in the `Deref` property, or if you use a constant value that is larger than `size_t` for properties like `ElementSize`.

Code analysis name: `INVALID_ATTRIBUTE_PROPERTY`
Expand All @@ -35,7 +34,7 @@ using namespace vc_attributes;
void f( [Pre( Deref=2, Access=Read )] char buffer[] );
```

To correct this warning, specify the correct level of dereference, as shown in the following sample code:
To correct this warning, specify the correct level of dereference, as shown in the following example code:

```cpp
// C
Expand Down
7 changes: 3 additions & 4 deletions docs/code-quality/c6501.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: "Warning C6501"
description: "Learn more about: Warning C6501"
title: Warning C6501
ms.date: 11/04/2016
f1_keywords: ["C6501", "CONFLICTING_ATTRIBUTE_PROPERTY_VALUES", "__WARNING_CONFLICTING_ATTRIBUTE_PROPERTY_VALUES"]
helpviewer_keywords: ["C6501"]
ms.assetid: f9e8b847-2516-4bbb-bb1c-c87cfbacf254
---
# Warning C6501

> Annotation conflict: '*name*' property conflicts with previously specified property

## Remarks

> [!NOTE]
> This warning occurs only in code that is using a deprecated version of the source-code annotation language (SAL). We recommend that you port your code to use the latest version of SAL. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).

## Remarks

This warning indicates the presence of conflicting properties in the annotation. The warning typically occurs when multiple properties that serve similar purpose are used to annotate a parameter or return value. To correct the warning, you must choose the property that best addresses your need.

Code analysis name: `CONFLICTING_ATTRIBUTE_PROPERTY_VALUES`
Expand Down
7 changes: 3 additions & 4 deletions docs/code-quality/c6503.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: "Warning C6503"
description: "Learn more about: Warning C6503"
title: Warning C6503
ms.date: 11/04/2016
f1_keywords: ["C6503", "REFERENCES_CANT_BE_NULL", "__WARNING_REFERENCES_CANT_BE_NULL"]
helpviewer_keywords: ["C6503"]
ms.assetid: a6212938-bef9-4830-becb-6baa70b53e97
---
# Warning C6503

> Invalid annotation: references and arrays may not be marked `Null=Yes` or `Null=Maybe`

## Remarks

> [!NOTE]
> This warning occurs only in code that is using a deprecated version of the source-code annotation language (SAL). We recommend that you port your code to use the latest version of SAL. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).

## Remarks

This warning indicates that `Null` property is incorrectly used on a reference or array type. A reference or array type holds the address of an object and must point to a valid object. Because reference and array types can't be null, you must correct the error by either removing the `Null` property or by setting the `Null` property value to `No`.

Code analysis name: `REFERENCES_CANT_BE_NULL`
Expand Down
6 changes: 3 additions & 3 deletions docs/code-quality/c6504.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Warning C6504
title: "Warning C6504"
description: "Learn more about: Warning C6504"
ms.date: 10/03/2022
f1_keywords: ["C6504", "NULL_ON_NON_POINTER", "__WARNING_NULL_ON_NON_POINTER"]
Expand All @@ -9,10 +9,10 @@ helpviewer_keywords: ["C6504"]

> Invalid annotation: property may only be used on values of pointer, pointer-to-member, or array type

This warning indicates the use of a pointer-specific SAL annotation on a non-pointer data type.

## Remarks

This warning indicates the use of a pointer-specific SAL annotation on a non-pointer data type.

For more information about what data types are supported by properties, see [Annotation Properties](using-sal-annotations-to-reduce-c-cpp-code-defects.md).

Code analysis name: `NULL_ON_NON_POINTER`
Expand Down
3 changes: 1 addition & 2 deletions docs/code-quality/c6505.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: "Warning C6505"
description: "Learn more about: Warning C6505"
title: Warning C6505
ms.date: 11/04/2016
f1_keywords: ["C6505", "MUSTCHECK_ON_VOID", "__WARNING_MUSTCHECK_ON_VOID"]
helpviewer_keywords: ["C6505"]
ms.assetid: 1883ce60-48d7-41c8-add8-814e4b8b908b
---
# Warning C6505

Expand Down
4 changes: 2 additions & 2 deletions docs/code-quality/c6506.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Warning C6506
title: "Warning C6506"
description: "Learn more about: Warning C6506"
ms.date: 11/04/2016
f1_keywords: ["C6506", "BUFFER_SIZE_ON_NON_POINTER_OR_ARRAY", "__WARNING_BUFFER_SIZE_ON_NON_POINTER_OR_ARRAY"]
Expand Down Expand Up @@ -27,7 +27,7 @@ void f(_Out_ char c)
}
```

To correct this warning, use a pointer or an array type, as shown in the following sample code:
To correct this warning, use a pointer or an array type, as shown in the following example code:

```cpp
#include <sal.h>
Expand Down
7 changes: 3 additions & 4 deletions docs/code-quality/c6508.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: "Warning C6508"
description: "Learn more about: Warning C6508"
title: Warning C6508
ms.date: 11/04/2016
f1_keywords: ["C6508", "WRITE_ACCESS_ON_CONST", "__WARNING_WRITE_ACCESS_ON_CONST"]
helpviewer_keywords: ["C6508"]
ms.assetid: ac5b23c8-ab9e-481b-bc97-8404f0b63100
---
# Warning C6508

> Invalid annotation: write access is not allowed on const values

## Remarks

> [!NOTE]
> This warning occurs only in code that is using a deprecated version of the source-code annotation language (SAL). We recommend that you port your code to use the latest version of SAL. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).

## Remarks

This warning indicates that the Access property specified on a const parameter implies that it can be written to. For constant values, Access=Read is the only valid setting.

Code analysis name: `WRITE_ACCESS_ON_CONST`
Expand Down
3 changes: 1 addition & 2 deletions docs/code-quality/c6509.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: "Warning C6509"
description: "Learn more about: Warning C6509"
title: Warning C6509
ms.date: 11/04/2016
f1_keywords: ["C6509", "RETURN_USED_ON_PRECONDITION", "__WARNING_RETURN_USED_ON_PRECONDITION"]
helpviewer_keywords: ["C6509"]
ms.assetid: 6311bfd9-8372-48da-b01b-1c8775c38449
---
# Warning C6509

Expand Down
3 changes: 1 addition & 2 deletions docs/code-quality/c6510.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: "Warning C6510"
description: "Learn more about: Warning C6510"
title: Warning C6510
ms.date: 11/04/2016
f1_keywords: ["C6510", "NULLTERMINATED_ON_NON_POINTER", "__WARNING_NULLTERMINATED_ON_NON_POINTER"]
helpviewer_keywords: ["C6510"]
ms.assetid: b7fc5eb4-3311-442c-ac79-401e88ef2129
---
# Warning C6510

Expand Down
7 changes: 3 additions & 4 deletions docs/code-quality/c6511.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: "Warning C6511"
description: "Learn more about: Warning C6511"
title: Warning C6511
ms.date: 11/04/2016
f1_keywords: ["C6511", "MUSTCHECK_MAYBE", "__WARNING_MUSTCHECK_MAYBE"]
helpviewer_keywords: ["C6511"]
ms.assetid: 1a0ac213-c205-4fb1-9bc3-3dc7885329fa
---
# Warning C6511

> Invalid annotation: MustCheck property must be Yes or No

## Remarks

> [!NOTE]
> This warning occurs only in code that is using a deprecated version of the source-code annotation language (SAL). We recommend that you port your code to use the latest version of SAL. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).

## Remarks

This warning indicates an invalid value for `MustCheck` property was specified. The only valid values for this property are: Yes and No.

Code analysis name: `MUSTCHECK_MAYBE`
Expand Down
7 changes: 3 additions & 4 deletions docs/code-quality/c6513.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: "Warning C6513"
description: "Learn more about: Warning C6513"
title: Warning C6513
ms.date: 11/04/2016
f1_keywords: ["C6513", "ELEMENT_SIZE_WITHOUT_BUFFER_SIZE", "__WARNING_ELEMENT_SIZE_WITHOUT_BUFFER_SIZE"]
helpviewer_keywords: ["C6513"]
ms.assetid: b27780ac-b237-4b26-a796-68a920da73a3
---
# Warning C6513

> Invalid annotation: ElementSizeConst requires additional size properties

## Remarks

> [!NOTE]
> This warning occurs only in code that is using a deprecated version of the source-code annotation language (SAL). We recommend that you port your code to use the latest version of SAL. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).

## Remarks

This warning indicates that `ElementSizeConst` requires other properties that are missing from the annotation. Specifying `ElementSizeConst` alone doesn't provide any benefit to the analysis process. In addition to specifying `ElementSize`, other properties such as `ValidElementsConst` or `WritableElementsConst` must also be specified.

Code analysis name: `ELEMENT_SIZE_WITHOUT_BUFFER_SIZE`
Expand Down
5 changes: 2 additions & 3 deletions docs/code-quality/c6514.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: "Warning C6514"
description: "Learn more about: Warning C6514"
title: Warning C6514
ms.date: 11/04/2016
f1_keywords: ["C6514", "BUFFER_SIZE_EXCEEDS_ARRAY_SIZE", "__WARNING_BUFFER_SIZE_EXCEEDS_ARRAY_SIZE"]
helpviewer_keywords: ["C6514"]
ms.assetid: 4930a9f9-c721-437f-8754-cf39b30ea2db
---
# Warning C6514

Expand All @@ -31,7 +30,7 @@ using namespace vc_attributes;
void f( [Pre(Deref=1, ValidElementsConst=8)] char(*matrix) [6] );
```

To correct this warning, make sure the size of specified in ValidElementsConst is less than or equal to the size of the array, as shown in the following sample code:
To correct this warning, make sure the size of specified in ValidElementsConst is less than or equal to the size of the array, as shown in the following example code:

```cpp
// C
Expand Down
3 changes: 1 addition & 2 deletions docs/code-quality/c6515.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: "Warning C6515"
description: "Learn more about: Warning C6515"
title: Warning C6515
ms.date: 11/04/2016
f1_keywords: ["C6515", "BUFFER_SIZE_ON_NON_POINTER", "__WARNING_BUFFER_SIZE_ON_NON_POINTER"]
helpviewer_keywords: ["C6515"]
ms.assetid: e0f21858-0fea-427b-965a-a7eff62e1371
---
# Warning C6515

Expand Down
7 changes: 3 additions & 4 deletions docs/code-quality/c6516.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: "Warning C6516"
description: "Learn more about: Warning C6516"
title: Warning C6516
ms.date: 11/04/2016
f1_keywords: ["C6516", "NO_PROPERTIES_ON_ATTRIBUTE", "__WARNING_NO_PROPERTIES_ON_ATTRIBUTE"]
helpviewer_keywords: ["C6516"]
ms.assetid: 461078c8-18d4-49ca-80a2-a15736f429a0
---
# Warning C6516

> Invalid annotation: no properties specified for '*name*' attribute

## Remarks

> [!NOTE]
> This warning occurs only in code that is using a deprecated version of the source-code annotation language (SAL). We recommend that you port your code to use the latest version of SAL. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).

## Remarks

This warning indicates that either no property was specified in the attribute or the property that was specified is invalid; therefore, the attribute can't be considered complete.

Code analysis name: `NO_PROPERTIES_ON_ATTRIBUTE`
Expand Down
7 changes: 3 additions & 4 deletions docs/code-quality/c6517.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: "Warning C6517"
description: "Learn more about: Warning C6517"
title: Warning C6517
ms.date: 11/04/2016
f1_keywords: ["C6517", "VALID_SIZE_ON_NON_READABLE_BUFFER", "__WARNING_VALID_SIZE_ON_NON_READABLE_BUFFER"]
helpviewer_keywords: ["C6517"]
ms.assetid: 96822155-8b2a-4699-980f-744afff84ca8
---
# Warning C6517

> Invalid annotation: 'SAL_readableTo' property may not be specified on buffers that are not readable: '*Parameter*'.

## Remarks

> [!NOTE]
> This warning occurs only in code that is using a deprecated version of the source-code annotation language (SAL). We recommend that you port your code to use the latest version of SAL. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).

## Remarks

This warning indicates that `SAL_readableTo` property doesn't have the required read access. You can't use this property to annotate a parameter without providing read access.

Code analysis name: `VALID_SIZE_ON_NON_READABLE_BUFFER`
Expand Down
3 changes: 1 addition & 2 deletions docs/code-quality/c6518.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: "Warning C6518"
description: "Learn more about: Warning C6518"
title: Warning C6518
ms.date: 11/04/2016
f1_keywords: ["C6518", "WRITABLE_SIZE_ON_NON_WRITABLE_BUFFER", "__WARNING_WRITABLE_SIZE_ON_NON_WRITABLE_BUFFER"]
helpviewer_keywords: ["C6518"]
ms.assetid: c391a75b-9f16-43a5-a7cd-c5a233002850
---
# Warning C6518

Expand Down
9 changes: 4 additions & 5 deletions docs/code-quality/c6522.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: "Warning C6522"
description: "Learn more about: Warning C6522"
title: Warning C6522
ms.date: 11/04/2016
f1_keywords: ["C6522", "INVALID_SIZE_STRING_TYPE", "__WARNING_INVALID_SIZE_STRING_TYPE"]
helpviewer_keywords: ["C6522"]
ms.assetid: ac482f63-b27f-4807-968a-1c449033d2dd
---
# Warning C6522

> Invalid size specification: expression must be of integral type: annotation '*annotation*' on function '*function*' '*parameter*'

## Remarks

> [!NOTE]
> This warning occurs only in code that is using a deprecated version of the source-code annotation language (SAL). We recommend that you port your code to use the latest version of SAL. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md).

## Remarks

This warning indicates that an integral type was expected, but an incorrect data type was used. You can use annotation properties that accept the size of a parameter in terms of another parameter, but you must use correct data type. For a list of annotation properties, see [Using SAL Annotations to reduce code defects](using-sal-annotations-to-reduce-c-cpp-code-defects.md).

Code analysis name: `INVALID_SIZE_STRING_TYPE`
Expand All @@ -34,7 +33,7 @@ using namespace vc_attributes;
void f ([Pre(ValidBytes="c")] char *pc, double c);
```

To correct this warning, use `size_t` for the `ValidBytesParam` parameter data type, as shown in the following sample code:
To correct this warning, use `size_t` for the `ValidBytesParam` parameter data type, as shown in the following example code:

```cpp
// C
Expand Down
Loading