bootstrap
[reactos.git] / include / ddk / rtl.h
index 178977d..d600c76 100644 (file)
@@ -1097,12 +1097,17 @@ RtlInitUnicodeStringFromLiteral (
 
  */
 
+/* Prevent hide of the inappropriate passed type by our
+ * de"const" of the string in the macro below.
+ */
+static inline const WCHAR *_RtlInitUnicodeStringFromLiteral_typecheck(const WCHAR *s) { return s; }
+
 #define RtlInitUnicodeStringFromLiteral(__PDEST_STRING__,__SOURCE_STRING__) \
  InitializeUnicodeString( \
   (__PDEST_STRING__), \
   sizeof(__SOURCE_STRING__) - sizeof(WCHAR), \
   sizeof(__SOURCE_STRING__), \
-  (__SOURCE_STRING__) \
+  (WCHAR * /* de"const" the string here */ )_RtlInitUnicodeStringFromLiteral_typecheck((__SOURCE_STRING__)) \
  )
 
 /*