[janitor] dlls/msvcrt -Wwrite-strings cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Index: dlls/msvcrt/file.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/file.c,v
retrieving revision 1.55
diff -u -r1.55 file.c
--- dlls/msvcrt/file.c	7 Oct 2003 05:22:04 -0000	1.55
+++ dlls/msvcrt/file.c	7 Oct 2003 19:11:39 -0000
@@ -2398,7 +2398,7 @@
 char *MSVCRT_tmpnam(char *s)
 {
   char tmpbuf[MAX_PATH];
-  char* prefix = "TMP";
+  const char* prefix = "TMP";
   if (!GetTempPathA(MAX_PATH,tmpbuf) ||
       !GetTempFileNameA(tmpbuf,prefix,0,MSVCRT_tmpname))
   {
Index: dlls/msvcrt/tests/cpp.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/tests/cpp.c,v
retrieving revision 1.1
diff -u -r1.1 cpp.c
--- dlls/msvcrt/tests/cpp.c	24 Sep 2003 18:49:45 -0000	1.1
+++ dlls/msvcrt/tests/cpp.c	7 Oct 2003 19:11:44 -0000
@@ -335,12 +335,13 @@
   if (pe)
   {
     /* vector dtor, multiple elements */
+    char name[] = "a constant";
     *((int*)pe) = 3;
     pe = (exception*)((int*)pe + 1);
     call_func2(pexception_ctor, &pe[0], &e_name);
     call_func2(pexception_ctor, &pe[1], &e_name);
     call_func2(pexception_ctor, &pe[2], &e_name);
-    pe[3].name = "a constant";
+    pe[3].name = name;
     pe[3].do_free = 1; /* Crash if we try to free this */
     call_func2(pexception_vector_dtor, pe, 3); /* Should delete all 3 and then pe block */
   }

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux