Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 70cf715

Browse files
authored
Add clarification on why this should be fixed by developers
1 parent e848088 commit 70cf715

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/code-quality/c26132.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ ms.date: 02/11/2025
1313
1414
The analyzer issues Warning C26132 when it detects that a lock, which is annotated to protect a value, isn't held while accessing the value. However, a related lock is held. The code may be thread-safe, so you might need to update the annotations.
1515

16+
This diagnostic usually does not indicate a bug in the code, but rather a mismatch between the annotations and the actual locking behavior. If this is the case, the diagnostic should be resolved as there may be other static analysis issues that are not being reported due to the inconsistant annotations.
17+
1618
## Examples
1719

1820
In the following example, C26132 is emitted when `data` is used.

docs/code-quality/c26133.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ ms.date: 02/19/2025
1313
1414
Warning C26133 is issued when the analyzer detects that the lock required to call a function isn't held when the function is called. However, another lock that appears to be related is held. It's possible the code is thread-safe, and the annotations need to be updated.
1515

16+
This diagnostic usually does not indicate a bug in the code, but rather a mismatch between the annotations and the actual locking behavior. If this is the case, the diagnostic should be resolved as there may be other static analysis issues that are not being reported due to the inconsistant annotations.
17+
1618
## Examples
1719

1820
In the following example, C26133 is emitted when `DoTaskWithCustomLock` is called.

0 commit comments

Comments
 (0)