From 01fbf25daba9ef578f2b57c3067bb4bd4963e450 Mon Sep 17 00:00:00 2001 From: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> Date: Tue, 4 Jun 2024 13:35:57 +0200 Subject: [PATCH] [DBGHELP][NDK][RTL] *RtlComputeCrc32(): Add 'const' to 2nd parameter (#6973) and sync SAL2 annotations. It didn't always warn in the past, our gutfeeling (we have *not* double-checked that thesis!) is that the warnings might have been triggered when 0.4.15-dev-958-g 237aa3a9c13f6e9a3104b4242972382ca7afdc11 was committed --- dll/win32/dbghelp/compat.c | 2 +- dll/win32/dbghelp/compat.h | 2 +- sdk/include/ndk/rtlfuncs.h | 2 +- sdk/lib/rtl/crc32.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dll/win32/dbghelp/compat.c b/dll/win32/dbghelp/compat.c index 8ef4d551e65..5846b59a454 100644 --- a/dll/win32/dbghelp/compat.c +++ b/dll/win32/dbghelp/compat.c @@ -498,7 +498,7 @@ static const ULONG CrcTable[256] = * @implemented */ ULONG -__RtlComputeCrc32(ULONG Initial, PUCHAR Data, ULONG Length) +__RtlComputeCrc32(ULONG Initial, const UCHAR *Data, ULONG Length) { ULONG CrcValue = ~Initial; diff --git a/dll/win32/dbghelp/compat.h b/dll/win32/dbghelp/compat.h index 02e693f62a5..9e0efa5ca27 100644 --- a/dll/win32/dbghelp/compat.h +++ b/dll/win32/dbghelp/compat.h @@ -818,7 +818,7 @@ typedef LONG KPRIORITY; PIMAGE_NT_HEADERS __RtlImageNtHeader(void *data); PVOID __RtlImageRvaToVa (const IMAGE_NT_HEADERS* NtHeader, PVOID BaseAddress, ULONG Rva, PIMAGE_SECTION_HEADER *SectionHeader); PVOID __RtlImageDirectoryEntryToData(PVOID BaseAddress, BOOLEAN MappedAsImage, USHORT Directory, PULONG Size); -ULONG __RtlComputeCrc32(ULONG Initial, PUCHAR Data, ULONG Length); +ULONG __RtlComputeCrc32(ULONG Initial, const UCHAR *Data, ULONG Length); typedef struct _CLIENT_ID { diff --git a/sdk/include/ndk/rtlfuncs.h b/sdk/include/ndk/rtlfuncs.h index 29ab006cf25..f85b93bd13f 100644 --- a/sdk/include/ndk/rtlfuncs.h +++ b/sdk/include/ndk/rtlfuncs.h @@ -4436,7 +4436,7 @@ ULONG NTAPI RtlComputeCrc32( _In_ ULONG InitialCrc, - _In_ PUCHAR Buffer, + _In_ const UCHAR *Buffer, _In_ ULONG Length ); diff --git a/sdk/lib/rtl/crc32.c b/sdk/lib/rtl/crc32.c index e5f53e2f755..ab9e24bd42e 100644 --- a/sdk/lib/rtl/crc32.c +++ b/sdk/lib/rtl/crc32.c @@ -86,9 +86,9 @@ static const ULONG CrcTable[256] = * @implemented */ ULONG NTAPI -RtlComputeCrc32(IN ULONG Initial, - IN PUCHAR Data, - IN ULONG Length) +RtlComputeCrc32(_In_ ULONG Initial, + _In_ const UCHAR *Data, + _In_ ULONG Length) { ULONG CrcValue = ~Initial;