=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: user32/tests: Constify some character strings.

Alexandre Julliard julliard at winehq.org
Tue Dec 31 11:11:44 CST 2013


Module: wine
Branch: master
Commit: 5e94a5d4c9c6d40c2bb939d5925c8def613bddfc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5e94a5d4c9c6d40c2bb939d5925c8def613bddfc

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Tue Dec 31 03:00:44 2013 +0100

user32/tests: Constify some character strings.

---

 dlls/user32/tests/dde.c    |   14 +++++++-------
 dlls/user32/tests/static.c |    2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c
index 4a50c39..3824081 100644
--- a/dlls/user32/tests/dde.c
+++ b/dlls/user32/tests/dde.c
@@ -2397,8 +2397,8 @@ static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV
     char str[MAX_PATH];
     static int msg_index = 0;
     static HCONV conversation = 0;
-    static char test_service [] = "TestDDEService";
-    static char test_topic [] = "TestDDETopic";
+    static const char test_service [] = "TestDDEService";
+    static const char test_topic [] = "TestDDETopic";
 
     msg_index++;
 
@@ -2586,10 +2586,10 @@ static void test_end_to_end_client(BOOL type_a)
     HSZ server, topic;
     HCONV hconv;
     HDDEDATA hdata;
-    static char test_service[] = "TestDDEService";
-    static WCHAR test_service_w[] = {'T','e','s','t','D','D','E','S','e','r','v','i','c','e',0};
-    static char test_topic[] = "TestDDETopic";
-    static WCHAR test_topic_w[] = {'T','e','s','t','D','D','E','T','o','p','i','c',0};
+    static const char test_service[] = "TestDDEService";
+    static const WCHAR test_service_w[] = {'T','e','s','t','D','D','E','S','e','r','v','i','c','e',0};
+    static const char test_topic[] = "TestDDETopic";
+    static const WCHAR test_topic_w[] = {'T','e','s','t','D','D','E','T','o','p','i','c',0};
 
     trace("Start end to end client %s\n", type_a ? "ASCII" : "UNICODE");
 
@@ -2651,7 +2651,7 @@ static void test_end_to_end_server(HANDLE hproc, HANDLE hthread, BOOL type_a)
     BOOL ret;
     DWORD res;
     HDDEDATA hdata;
-    static CHAR test_service[] = "TestDDEService";
+    static const char test_service[] = "TestDDEService";
 
     trace("start end to end server %s\n", type_a ? "ASCII" : "UNICODE");
     server_pid = 0;
diff --git a/dlls/user32/tests/static.c b/dlls/user32/tests/static.c
index 51d2bc3..d4aa9b1 100644
--- a/dlls/user32/tests/static.c
+++ b/dlls/user32/tests/static.c
@@ -119,7 +119,7 @@ static void test_updates(int style, int flags)
 
 START_TEST(static)
 {
-    static char szClassName[] = "testclass";
+    static const char szClassName[] = "testclass";
     WNDCLASSEXA  wndclass;
 
     wndclass.cbSize         = sizeof(wndclass);




More information about the wine-cvs mailing list