Skip to content

Commit da1ffe0

Browse files
authored
Fix typos and improve clarity in docs
1 parent 70cf715 commit da1ffe0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/code-quality/c26132.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ 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.
16+
This diagnostic usually doesn't indicate a bug in the code, but rather a mismatch between the annotations and the actual locking behavior. If so, the diagnostic should be resolved as there may be other static analysis issues that aren't being reported due to the inconsistent annotations.
1717

1818
## Examples
1919

@@ -45,7 +45,7 @@ void Initialize(_Guarded_by_(customLock01) int* data)
4545
}
4646
```
4747
48-
In this example, the `Initialize` function is thread-safe and behaves as designed, but that design isn't correctly reflected in the concurrency SAL annotations. Fix by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. This could also be fixed by changing the `_Guarded_by_` annotation from `customLock01` to `customLock01.cs`.
48+
In this example, the `Initialize` function is thread-safe and behaves as designed, but that design isn't correctly reflected in the concurrency SAL annotations. Fix by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. The warning could also be fixed by changing the `_Guarded_by_` annotation from `customLock01` to `customLock01.cs`.
4949
5050
```cpp
5151
#include <sal.h>

docs/code-quality/c26133.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ 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.
16+
This diagnostic usually doesn't indicate a bug in the code, but rather a mismatch between the annotations and the actual locking behavior. If so, the diagnostic should be resolved as there may be other static analysis issues that aren't being reported due to the inconsistent annotations.
1717

1818
## Examples
1919

@@ -47,7 +47,7 @@ void DoTask()
4747
}
4848
```
4949
50-
In this example, the `DoTask` function is thread-safe and behaves as designed, but that design isn't correctly reflected in the concurrency SAL annotations. Fix by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. This could also be fixed by changing the `_Requires_lock_held_` annotation from `customLock01` to `customLock01.cs`.
50+
In this example, the `DoTask` function is thread-safe and behaves as designed, but that design isn't correctly reflected in the concurrency SAL annotations. Fix by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. The warning could also be fixed by changing the `_Requires_lock_held_` annotation from `customLock01` to `customLock01.cs`.
5151
5252
```cpp
5353
#include <sal.h>

0 commit comments

Comments
 (0)