Reactos

[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

authored by

Serge Gautherie and committed by
GitHub
01fbf25d 1cd08eee

+6 -6
+1 -1
dll/win32/dbghelp/compat.c
··· 498 498 * @implemented 499 499 */ 500 500 ULONG 501 - __RtlComputeCrc32(ULONG Initial, PUCHAR Data, ULONG Length) 501 + __RtlComputeCrc32(ULONG Initial, const UCHAR *Data, ULONG Length) 502 502 { 503 503 ULONG CrcValue = ~Initial; 504 504
+1 -1
dll/win32/dbghelp/compat.h
··· 818 818 PIMAGE_NT_HEADERS __RtlImageNtHeader(void *data); 819 819 PVOID __RtlImageRvaToVa (const IMAGE_NT_HEADERS* NtHeader, PVOID BaseAddress, ULONG Rva, PIMAGE_SECTION_HEADER *SectionHeader); 820 820 PVOID __RtlImageDirectoryEntryToData(PVOID BaseAddress, BOOLEAN MappedAsImage, USHORT Directory, PULONG Size); 821 - ULONG __RtlComputeCrc32(ULONG Initial, PUCHAR Data, ULONG Length); 821 + ULONG __RtlComputeCrc32(ULONG Initial, const UCHAR *Data, ULONG Length); 822 822 823 823 typedef struct _CLIENT_ID 824 824 {
+1 -1
sdk/include/ndk/rtlfuncs.h
··· 4436 4436 NTAPI 4437 4437 RtlComputeCrc32( 4438 4438 _In_ ULONG InitialCrc, 4439 - _In_ PUCHAR Buffer, 4439 + _In_ const UCHAR *Buffer, 4440 4440 _In_ ULONG Length 4441 4441 ); 4442 4442
+3 -3
sdk/lib/rtl/crc32.c
··· 86 86 * @implemented 87 87 */ 88 88 ULONG NTAPI 89 - RtlComputeCrc32(IN ULONG Initial, 90 - IN PUCHAR Data, 91 - IN ULONG Length) 89 + RtlComputeCrc32(_In_ ULONG Initial, 90 + _In_ const UCHAR *Data, 91 + _In_ ULONG Length) 92 92 { 93 93 ULONG CrcValue = ~Initial; 94 94