Cosmetic: RtlAppendUnicodeToString(): Fix 'const' compiler warnings
[reactos.git] / include / ntos / rtl.h
index a1f0f2e..f43dd49 100755 (executable)
                } \
        }
 */
+#ifdef G_GNUC_UNUSED
+static inline PSINGLE_LIST_ENTRY PopEntryList(PSINGLE_LIST_ENTRY ListHead) G_GNUC_UNUSED;
+#endif /* G_GNUC_UNUSED */
 static inline PSINGLE_LIST_ENTRY
 PopEntryList(PSINGLE_LIST_ENTRY ListHead)
 {
@@ -193,6 +196,9 @@ PopEntryList(PSINGLE_LIST_ENTRY ListHead)
 #define RtlCopyMemory(Destination,Source,Length) \
        memcpy((Destination),(Source),(Length))
 
+#ifdef G_GNUC_UNUSED
+static inline VOID PushEntryList(PSINGLE_LIST_ENTRY ListHead,PSINGLE_LIST_ENTRY Entry) G_GNUC_UNUSED;
+#endif /* G_GNUC_UNUSED */
 static
 inline
 VOID
@@ -262,6 +268,9 @@ RemoveHeadList (
        );
 */
 
+#ifdef G_GNUC_UNUSED
+static inline PLIST_ENTRY RemoveHeadList(PLIST_ENTRY ListHead) G_GNUC_UNUSED;
+#endif /* G_GNUC_UNUSED */
 static
 inline
 PLIST_ENTRY
@@ -316,6 +325,9 @@ RemoveTailList (
        );
 */
 
+#ifdef G_GNUC_UNUSED
+static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY ListHead) G_GNUC_UNUSED;
+#endif /* G_GNUC_UNUSED */
 static
 inline
 PLIST_ENTRY
@@ -346,7 +358,7 @@ NTSTATUS
 STDCALL
 RtlAppendUnicodeToString (
        PUNICODE_STRING Destination,
-       PWSTR           Source
+       PCWSTR          Source
        );
 
 ULONG
@@ -510,13 +522,21 @@ extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
  * length otherwise
  */
 
+/* Prevent hide of the inappropriate passed type by our
+ * de"const" of the string in the macro below.
+ */
+#ifdef G_GNUC_UNUSED
+static inline const WCHAR *_RtlInitUnicodeStringFromLiteral_typecheck(const WCHAR *s) G_GNUC_UNUSED;
+#endif /* G_GNUC_UNUSED */
+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__)) \
+ )
 
 
 /*
@@ -564,6 +584,9 @@ PushEntryList (
 /*
  * An ReactOS extension
  */
+#ifdef G_GNUC_UNUSED
+static inline PSINGLE_LIST_ENTRY PopEntrySList(PSLIST_HEADER ListHead) G_GNUC_UNUSED;
+#endif /* G_GNUC_UNUSED */
 static
 inline
 PSINGLE_LIST_ENTRY
@@ -587,6 +610,9 @@ PSINGLE_LIST_ENTRY
 /*
  * An ReactOS extension
  */
+#ifdef G_GNUC_UNUSED
+static inline VOID PushEntrySList(PSLIST_HEADER ListHead,PSINGLE_LIST_ENTRY Entry) G_GNUC_UNUSED;
+#endif /* G_GNUC_UNUSED */
 static
 inline
 VOID
@@ -891,7 +917,7 @@ BOOLEAN
 STDCALL
 RtlCreateUnicodeString (
        OUT     PUNICODE_STRING Destination,
-       IN      PWSTR           Source
+       IN      PCWSTR          Source
        );
 
 BOOLEAN STDCALL
@@ -1236,7 +1262,16 @@ RtlInsertElementGenericTable (
        IN OUT  PRTL_GENERIC_TABLE      Table,
        IN      PVOID                   Element,
        IN      ULONG                   ElementSize,
-       IN      ULONG                   Unknown4
+       IN      PBOOLEAN                NewElement      OPTIONAL
+       );
+
+PVOID
+STDCALL
+RtlLookupElementGenericTableFull (
+       IN OUT  PRTL_GENERIC_TABLE      Table,
+       IN      PVOID                   Element,
+       OUT     PVOID                   *NodeOrParent,
+       OUT     TABLE_SEARCH_RESULT     *SearchResult
        );
 
 NTSTATUS