https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b72efb6ca85b43097713a…
commit b72efb6ca85b43097713a45f7fb72e5937fb2cd2
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Thu Nov 25 11:13:11 2021 -0500
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Thu Feb 17 22:01:37 2022 -0500
[CRT] Fix some inconsistent annotations in CRT headers.
This fixes about 5000 VS analysis warnings.
---
sdk/include/crt/io.h | 2 ++
sdk/include/crt/stdlib.h | 2 +-
sdk/include/crt/string.h | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/sdk/include/crt/io.h b/sdk/include/crt/io.h
index 404407d7dba..e6a452cc0ac 100644
--- a/sdk/include/crt/io.h
+++ b/sdk/include/crt/io.h
@@ -474,6 +474,7 @@ _getcwd(
#include <string.h>
#endif
+ _Check_return_
__CRT_INLINE
intptr_t
__cdecl
@@ -492,6 +493,7 @@ _getcwd(
return ret;
}
+ _Check_return_
__CRT_INLINE
int
__cdecl
diff --git a/sdk/include/crt/stdlib.h b/sdk/include/crt/stdlib.h
index 3985a547536..e3548a84a71 100644
--- a/sdk/include/crt/stdlib.h
+++ b/sdk/include/crt/stdlib.h
@@ -1432,7 +1432,7 @@ extern "C" {
_Check_return_ long long __cdecl llabs(_In_ long long _j);
#pragma function(llabs)
#endif
- __MINGW_EXTENSION __CRT_INLINE long long __cdecl llabs(_In_ long long _j) { return (_j
>= 0 ? _j : -_j); }
+ __MINGW_EXTENSION _Check_return_ __CRT_INLINE long long __cdecl llabs(_In_ long long
_j) { return (_j >= 0 ? _j : -_j); }
__MINGW_EXTENSION long long __cdecl strtoll(const char* __restrict__, char**
__restrict, int);
__MINGW_EXTENSION unsigned long long __cdecl strtoull(const char* __restrict__, char**
__restrict__, int);
diff --git a/sdk/include/crt/string.h b/sdk/include/crt/string.h
index 23cf26a9ce1..1dd1fe0aba1 100644
--- a/sdk/include/crt/string.h
+++ b/sdk/include/crt/string.h
@@ -508,7 +508,7 @@ extern "C" {
_strupr_s_l(
_Inout_updates_z_(_Size) char *_Str,
_In_ size_t _Size,
- _locale_t _Locale);
+ _In_opt_ _locale_t _Locale);
_Check_return_wat_
_CRTIMP