[XDK] Fix a noisy clang warning in RTL_CONSTANT_STRING. CORE-14306

..\ntoskrnl\vdm\vdmmain.c(91,34): warning: expression does not compute the number of elements in this array; element type is 'unsigned short', not 'char' [-Wsizeof-array-div]
    UNICODE_STRING PhysMemName = RTL_CONSTANT_STRING(L"\\Device\\PhysicalMemory");
                                 ^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\ROS\reactos\output-clang\sdk\include\psdk\ntdef.h(1542,15): note: expanded from macro 'RTL_CONSTANT_STRING'
    sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \
           ~  ^
..\ntoskrnl\vdm\vdmmain.c(91,34): note: place parentheses around the 'sizeof (_RTL_CONSTANT_STRING_type_check(L"\\Device\\PhysicalMemory"))' expression to silence this warning
C:\ROS\reactos\output-clang\sdk\include\psdk\ntdef.h(1542,15): note: expanded from macro 'RTL_CONSTANT_STRING'
    sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \
              ^
1 warning generated.
This commit is contained in:
Thomas Faber 2020-08-15 21:55:52 +02:00
parent f86257259a
commit b957229c1b
No known key found for this signature in database
GPG Key ID: 076E7C3D44720826

View File

@ -220,7 +220,7 @@ char _RTL_CONSTANT_STRING_type_check(const void *s);
#endif #endif
#define RTL_CONSTANT_STRING(s) { \ #define RTL_CONSTANT_STRING(s) { \
sizeof(s)-sizeof((s)[0]), \ sizeof(s)-sizeof((s)[0]), \
sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \ sizeof(s) / (sizeof(_RTL_CONSTANT_STRING_type_check(s))), \
_RTL_CONSTANT_STRING_remove_const_macro(s) } _RTL_CONSTANT_STRING_remove_const_macro(s) }
#ifdef _MSC_VER #ifdef _MSC_VER