Skip to content

Commit a37995c

Browse files
Merge pull request #8 from MicrosoftDocs/master
bringing in the sheep
2 parents f74739c + 4cc4a19 commit a37995c

File tree

80 files changed

+1003
-580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1003
-580
lines changed

docs/code-quality/best-practices-and-examples-sal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ BOOL StrEquals2(_In_ PSTR p1, _In_ PSTR p2)
145145

146146
```
147147
148-
## \_Out_range\_
148+
## \_Out\_range\_
149149
150150
If the parameter is a pointer and you want to express the range of the value of the element that is pointed to by the pointer, use `_Deref_out_range_` instead of `_Out_range_`. In the following example, the range of *pcbFilled is expressed, not pcbFilled.
151151

docs/code-quality/c26130.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C26130
19-
warning C26130: Missing annotation _Requires_lock_held\_(\<lock>) or _No_competing_thread\_ at function \<func>. Otherwise it could be a race condition. Variable \<var> should be protected by lock \<lock>.
19+
warning C26130: Missing annotation \_Requires\_lock\_held\_(\<lock>) or \_No\_competing\_thread\_ at function \<func>. Otherwise it could be a race condition. Variable \<var> should be protected by lock \<lock>.
2020

2121
Warning C26130 is issued when the analyzer detects a potential race condition but infers that the function is likely to be run in a single threaded mode, for example, when the function is in the initialization stage based on certain heuristics.
2222

docs/code-quality/c28020.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ ms.workload:
1818
# C28020
1919
warning C28020: The expression \<expr> is not true at this call
2020

21-
This warning is reported when the _Satisfies\_ expression listed is not true. Frequently this indicates an incorrect parameter.
21+
This warning is reported when the \_Satisfies\_ expression listed is not true. Frequently this indicates an incorrect parameter.
2222

2323
If this occurs on a function declaration, the annotations indicate an impossible condition.

docs/code-quality/c28216.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C28216
19-
warning C28216: The _Check_return\_ annotation only applies to post-conditions for the specific function parameter.
19+
warning C28216: The \_Check\_return\_ annotation only applies to post-conditions for the specific function parameter.
2020

2121
The `_Check_return_` annotation has been applied in a context other than `__post`; it may need a `__post` (or `__drv_out`) modifier, or it may be placed incorrectly.

docs/code-quality/c28222.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C28222
19-
warning 28222: _Yes\_, _No\_, or _Maybe\_ expected for annotation
19+
warning 28222: \_Yes\_, \_No\_, or \_Maybe\_ expected for annotation
2020

2121
This warning indicates that a parameter to an annotation is expected to be one of the symbols `_Yes_`, `_No_`, or `_Maybe_`, and some other symbol was encountered. This usually indicates an incorrectly coded annotation macro.

docs/code-quality/c28232.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C28232
19-
warning C28232: _Pre\_, _Post\_, or _Deref\_ not applied to any annotation
19+
warning C28232: \_Pre\_, \_Post\_, or \_Deref\_ not applied to any annotation
2020

2121
This warning indicates that a `_Pre_`, `_Post_`, or `_Deref_` operator appears in an annotation expression without a subsequent functional annotation; the modifier was ignored, but this indicates an incorrectly coded annotation.

docs/code-quality/c28234.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C28234
19-
warning C28234: _At\_ expression does not apply to current function
19+
warning C28234: \_At\_ expression does not apply to current function
2020

2121
This warning indicates that the value of an `_At_` expression does not identify an accessible object.

docs/code-quality/c28275.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C28275
19-
warning C28275: The parameter to _Macro_value\_ is null
19+
warning C28275: The parameter to \_Macro\_value\_ is null
2020

2121
This warning indicates that there is an internal error in the model file, not in the code being analyzed. The *macroValue* function was called without a parameter.

docs/code-quality/c28287.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C28287
19-
warning C28287: For function, syntax Error in _At\_() annotation (unrecognized parameter name)
19+
warning C28287: For function, syntax Error in \_At\_() annotation (unrecognized parameter name)
2020

2121
The Code Analysis tool reports this warning when the `SAL_at` (`__drv_at`) annotation is used and the parameter expression cannot be interpreted in the current context. This might include using a misspelled parameter or member name, or a misspelling of "return" or "this" keywords.

docs/code-quality/c28288.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C28288
19-
warning C28288: For function, syntax Error in _At\_() annotation (invalid parameter name)
19+
warning C28288: For function, syntax Error in \_At\_() annotation (invalid parameter name)
2020

2121
The Code Analysis tool reports this warning when the `SAL_at` (`__drv_at`) annotation is used and the parameter expression cannot be interpreted in the current context. This might include using a misspelled parameter or member name, or a misspelling of "return" or "this" keywords.

docs/code-quality/c6517.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C6517
19-
warning C6517: Invalid annotation: 'SAL_readableTo' property may not be specified on buffers that are not readable: '_Param\_(1)'.
19+
warning C6517: Invalid annotation: 'SAL_readableTo' property may not be specified on buffers that are not readable: '\_Param\_(1)'.
2020

2121
> [!NOTE]
2222
> 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).

docs/code-quality/c6518.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.workload:
1616
- "multiple"
1717
---
1818
# C6518
19-
warning C6518: Invalid annotation: 'SAL_writableTo' property may not be specified as a precondition on buffers that are not writable: '_Param\_(1)'
19+
warning C6518: Invalid annotation: 'SAL_writableTo' property may not be specified as a precondition on buffers that are not writable: '\_Param\_(1)'
2020

2121
This warning indicates that a conflict exists between a `SAL_writableTo` property value and a writable property. This ordinarily indicates that a writable property does not have write access to the parameter being annotated.
2222

2.25 KB
Loading

docs/code-quality/mixed-minimum-rules-rule-set.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ The Microsoft Mixed Minimum Rules focus on the most critical problems in your C+
7979
|[C28182](../code-quality/c28182.md)|Dereferencing NULL pointer. The pointer contains the same NULL value as another pointer did.|
8080
|[C28202](../code-quality/c28202.md)|Illegal reference to non-static member|
8181
|[C28203](../code-quality/c28203.md)|Ambiguous reference to class member.|
82-
|[C28205](../code-quality/c28205.md)|_Success\_ or _On_failure\_ used in an illegal context|
82+
|[C28205](../code-quality/c28205.md)|\_Success\_ or \_On\_failure\_ used in an illegal context|
8383
|[C28206](../code-quality/c28206.md)|Left operand points to a struct, use '->'|
8484
|[C28207](../code-quality/c28207.md)|Left operand is a struct, use '.'|
8585
|[C28210](../code-quality/c28210.md)|Annotations for the __on_failure context must not be in explicit pre context|
8686
|[C28211](../code-quality/c28211.md)|Static context name expected for SAL_context|
8787
|[C28212](../code-quality/c28212.md)|Pointer expression expected for annotation|
88-
|[C28213](../code-quality/c28213.md)|The _Use_decl_annotations\_ annotation must be used to reference, without modification, a prior declaration.|
88+
|[C28213](../code-quality/c28213.md)|The \_Use\_decl\_annotations\_ annotation must be used to reference, without modification, a prior declaration.|
8989
|[C28214](../code-quality/c28214.md)|Attribute parameter names must be p1...p9|
9090
|[C28215](../code-quality/c28215.md)|The typefix cannot be applied to a parameter that already has a typefix|
9191
|[C28216](../code-quality/c28216.md)|The checkReturn annotation only applies to postconditions for the specific function parameter.|
@@ -127,22 +127,22 @@ The Microsoft Mixed Minimum Rules focus on the most critical problems in your C+
127127
|[C28267](../code-quality/c28267.md)|A syntax error in the annotations was found annotation in the function.|
128128
|[C28272](../code-quality/c28272.md)|The annotation for function, parameter when examining is inconsistent with the function declaration|
129129
|[C28273](../code-quality/c28273.md)|For function, the clues are inconsistent with the function declaration|
130-
|[C28275](../code-quality/c28275.md)|The parameter to _Macro_value\_ is null|
130+
|[C28275](../code-quality/c28275.md)|The parameter to \_Macro\_value\_ is null|
131131
|[C28279](../code-quality/c28279.md)|For symbol, a 'begin' was found without a matching 'end'|
132132
|[C28280](../code-quality/c28280.md)|For symbol, an 'end' was found without a matching 'begin'|
133133
|[C28282](../code-quality/c28282.md)|Format Strings must be in preconditions|
134134
|[C28285](../code-quality/c28285.md)|For function, syntax error in parameter|
135135
|[C28286](../code-quality/c28286.md)|For function, syntax error near the end|
136-
|[C28287](../code-quality/c28287.md)|For function, syntax Error in _At\_() annotation (unrecognized parameter name)|
137-
|[C28288](../code-quality/c28288.md)|For function, syntax Error in _At\_() annotation (invalid parameter name)|
136+
|[C28287](../code-quality/c28287.md)|For function, syntax Error in \_At\_() annotation (unrecognized parameter name)|
137+
|[C28288](../code-quality/c28288.md)|For function, syntax Error in \_At\_() annotation (invalid parameter name)|
138138
|[C28289](../code-quality/c28289.md)|For function: ReadableTo or WritableTo did not have a limit-spec as a parameter|
139139
|[C28290](../code-quality/c28290.md)|the annotation for function contains more Externals than the actual number of parameters|
140140
|[C28291](../code-quality/c28291.md)|post null/notnull at deref level 0 is meaningless for function.|
141141
|[C28300](../code-quality/c28300.md)|Expression operands of incompatible types for operator|
142142
|[C28301](../code-quality/c28301.md)|No annotations for first declaration of function.|
143-
|[C28302](../code-quality/c28302.md)|An extra _Deref\_ operator was found on annotation.|
144-
|[C28303](../code-quality/c28303.md)|An ambiguous _Deref\_ operator was found on annotation.|
145-
|[C28304](../code-quality/c28304.md)|An improperly placed _Notref\_ operator was found applied to token.|
143+
|[C28302](../code-quality/c28302.md)|An extra \_Deref\_ operator was found on annotation.|
144+
|[C28303](../code-quality/c28303.md)|An ambiguous \_Deref\_ operator was found on annotation.|
145+
|[C28304](../code-quality/c28304.md)|An improperly placed \_Notref\_ operator was found applied to token.|
146146
|[C28305](../code-quality/c28305.md)|An error while parsing a token was discovered.|
147147
|[C28350](../code-quality/c28350.md)|The annotation describes a situation that is not conditionally applicable.|
148148
|[C28351](../code-quality/c28351.md)|The annotation describes where a dynamic value (a variable) cannot be used in the condition.|

docs/code-quality/mixed-recommended-rules-rule-set.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ The Microsoft Mixed Recommended Rules focus on the most common and critical prob
145145
|[C28020](../code-quality/c28020.md)|The expression is not true at this call|
146146
|[C28021](../code-quality/c28021.md)|The parameter being annotated must be a pointer|
147147
|[C28022](../code-quality/c28022.md)|The function class(es) on this function do not match the function class(es) on the typedef used to define it.|
148-
|[C28023](../code-quality/c28023.md)|The function being assigned or passed should have a _Function_class\_ annotation for at least one of the class(es)|
148+
|[C28023](../code-quality/c28023.md)|The function being assigned or passed should have a \_Function\_class\_ annotation for at least one of the class(es)|
149149
|[C28024](../code-quality/c28024.md)|The function pointer being assigned to is annotated with the function class, which is not contained in the function class(es) list.|
150150
|[C28039](../code-quality/c28039.md)|The type of actual parameter should exactly match the type|
151151
|[C28112](../code-quality/c28112.md)|A variable which is accessed via an Interlocked function must always be accessed via an Interlocked function.|
@@ -163,14 +163,14 @@ The Microsoft Mixed Recommended Rules focus on the most common and critical prob
163163
|[C28196](../code-quality/c28196.md)|The requirement is not satisfied. (The expression does not evaluate to true.)|
164164
|[C28202](../code-quality/c28202.md)|Illegal reference to non-static member|
165165
|[C28203](../code-quality/c28203.md)|Ambiguous reference to class member.|
166-
|[C28205](../code-quality/c28205.md)|_Success\_ or _On_failure\_ used in an illegal context|
166+
|[C28205](../code-quality/c28205.md)|\_Success\_ or \_On\_failure\_ used in an illegal context|
167167
|[C28206](../code-quality/c28206.md)|Left operand points to a struct, use '->'|
168168
|[C28207](../code-quality/c28207.md)|Left operand is a struct, use '.'|
169169
|[C28209](../code-quality/c28209.md)|The declaration for symbol has a conflicting declaration|
170170
|[C28210](../code-quality/c28210.md)|Annotations for the __on_failure context must not be in explicit pre context|
171171
|[C28211](../code-quality/c28211.md)|Static context name expected for SAL_context|
172172
|[C28212](../code-quality/c28212.md)|Pointer expression expected for annotation|
173-
|[C28213](../code-quality/c28213.md)|The _Use_decl_annotations\_ annotation must be used to reference, without modification, a prior declaration.|
173+
|[C28213](../code-quality/c28213.md)|The \_Use\_decl\_annotations\_ annotation must be used to reference, without modification, a prior declaration.|
174174
|[C28214](../code-quality/c28214.md)|Attribute parameter names must be p1...p9|
175175
|[C28215](../code-quality/c28215.md)|The typefix cannot be applied to a parameter that already has a typefix|
176176
|[C28216](../code-quality/c28216.md)|The checkReturn annotation only applies to postconditions for the specific function parameter.|
@@ -213,22 +213,22 @@ The Microsoft Mixed Recommended Rules focus on the most common and critical prob
213213
|[C28267](../code-quality/c28267.md)|A syntax error in the annotations was found annotation in the function.|
214214
|[C28272](../code-quality/c28272.md)|The annotation for function, parameter when examining is inconsistent with the function declaration|
215215
|[C28273](../code-quality/c28273.md)|For function, the clues are inconsistent with the function declaration|
216-
|[C28275](../code-quality/c28275.md)|The parameter to _Macro_value\_ is null|
216+
|[C28275](../code-quality/c28275.md)|The parameter to \_Macro\_value\_ is null|
217217
|[C28279](../code-quality/c28279.md)|For symbol, a 'begin' was found without a matching 'end'|
218218
|[C28280](../code-quality/c28280.md)|For symbol, an 'end' was found without a matching 'begin'|
219219
|[C28282](../code-quality/c28282.md)|Format Strings must be in preconditions|
220220
|[C28285](../code-quality/c28285.md)|For function, syntax error in parameter|
221221
|[C28286](../code-quality/c28286.md)|For function, syntax error near the end|
222-
|[C28287](../code-quality/c28287.md)|For function, syntax Error in _At\_() annotation (unrecognized parameter name)|
223-
|[C28288](../code-quality/c28288.md)|For function, syntax Error in _At\_() annotation (invalid parameter name)|
222+
|[C28287](../code-quality/c28287.md)|For function, syntax Error in \_At\_() annotation (unrecognized parameter name)|
223+
|[C28288](../code-quality/c28288.md)|For function, syntax Error in \_At\_() annotation (invalid parameter name)|
224224
|[C28289](../code-quality/c28289.md)|For function: ReadableTo or WritableTo did not have a limit-spec as a parameter|
225225
|[C28290](../code-quality/c28290.md)|the annotation for function contains more Externals than the actual number of parameters|
226226
|[C28291](../code-quality/c28291.md)|post null/notnull at deref level 0 is meaningless for function.|
227227
|[C28300](../code-quality/c28300.md)|Expression operands of incompatible types for operator|
228228
|[C28301](../code-quality/c28301.md)|No annotations for first declaration of function.|
229-
|[C28302](../code-quality/c28302.md)|An extra _Deref\_ operator was found on annotation.|
230-
|[C28303](../code-quality/c28303.md)|An ambiguous _Deref\_ operator was found on annotation.|
231-
|[C28304](../code-quality/c28304.md)|An improperly placed _Notref\_ operator was found applied to token.|
229+
|[C28302](../code-quality/c28302.md)|An extra \_Deref\_ operator was found on annotation.|
230+
|[C28303](../code-quality/c28303.md)|An ambiguous \_Deref\_ operator was found on annotation.|
231+
|[C28304](../code-quality/c28304.md)|An improperly placed \_Notref\_ operator was found applied to token.|
232232
|[C28305](../code-quality/c28305.md)|An error while parsing a token was discovered.|
233233
|[C28306](../code-quality/c28306.md)|The annotation on parameter is obsolescent|
234234
|[C28307](../code-quality/c28307.md)|The annotation on parameter is obsolescent|

0 commit comments

Comments
 (0)