[janitor] dlls/ntdll -Wwrite-strings cleanup

Daniel Marmier d.marmier at bluewin.ch
Sat Oct 4 10:10:32 CDT 2003


Fixed warnings with gcc option "-Wwrite-strings".

-------------- next part --------------
Index: dlls/ntdll/tests/path.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/tests/path.c,v
retrieving revision 1.3
diff -u -r1.3 path.c
--- dlls/ntdll/tests/path.c	5 Sep 2003 23:08:34 -0000	1.3
+++ dlls/ntdll/tests/path.c	4 Oct 2003 14:58:18 -0000
@@ -157,7 +157,7 @@
 {
     struct test
     {
-        char *path;
+        const char *path;
         BOOLEAN result;
         BOOLEAN spaces;
     };
@@ -199,7 +199,9 @@
     ustr.Buffer = buffer;
     for (test = tests; test->path; test++)
     {
-        oem.Buffer = test->path;
+        char path[100];
+        strcpy(path, test->path);
+        oem.Buffer = path;
         oem.Length = strlen(test->path);
         oem.MaximumLength = oem.Length + 1;
         pRtlOemStringToUnicodeString( &ustr, &oem, FALSE );
Index: dlls/ntdll/tests/rtlstr.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/tests/rtlstr.c,v
retrieving revision 1.12
diff -u -r1.12 rtlstr.c
--- dlls/ntdll/tests/rtlstr.c	4 Oct 2003 03:04:47 -0000	1.12
+++ dlls/ntdll/tests/rtlstr.c	4 Oct 2003 14:58:31 -0000
@@ -41,7 +41,7 @@
 static NTSTATUS (WINAPI *pRtlAppendStringToString)(STRING *, const STRING *);
 static NTSTATUS (WINAPI *pRtlAppendUnicodeStringToString)(UNICODE_STRING *, const UNICODE_STRING *);
 static NTSTATUS (WINAPI *pRtlAppendUnicodeToString)(UNICODE_STRING *, LPCWSTR);
-static NTSTATUS (WINAPI *pRtlCharToInteger)(char *, ULONG, int *);
+static NTSTATUS (WINAPI *pRtlCharToInteger)(PCSZ, ULONG, int *);
 static VOID     (WINAPI *pRtlCopyString)(STRING *, const STRING *);
 static BOOLEAN  (WINAPI *pRtlCreateUnicodeString)(PUNICODE_STRING, LPCWSTR);
 static BOOLEAN  (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR);
@@ -1211,7 +1211,7 @@
 
 typedef struct {
     int base;
-    char *str;
+    const char *str;
     int value;
     NTSTATUS result;
 } str2int_t;


More information about the wine-patches mailing list