urlmon: Write-strings warnings fix

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Jun 10 12:29:24 CDT 2006


Changelog:
    urlmon: Write-strings warnings fix.

diff -urN a/dlls/urlmon/regsvr.c b/dlls/urlmon/regsvr.c
--- a/dlls/urlmon/regsvr.c	2006-05-23 17:24:50.000000000 +0100
+++ b/dlls/urlmon/regsvr.c	2006-06-10 18:09:23.000000000 +0100
@@ -572,10 +572,6 @@
  *              register_inf
  */
 
-#define INF_SET_CLSID(clsid) \
-    pse[i].pszName = "CLSID_" #clsid; \
-    clsids[i++] = &CLSID_ ## clsid;
-
 static HRESULT register_inf(BOOL doregister)
 {
     HRESULT hres;
@@ -587,14 +583,29 @@
     int i = 0;
 
     static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
-    
-    INF_SET_CLSID(CdlProtocol);
-    INF_SET_CLSID(FileProtocol);
-    INF_SET_CLSID(FtpProtocol);
-    INF_SET_CLSID(GopherProtocol);
-    INF_SET_CLSID(HttpProtocol);
-    INF_SET_CLSID(HttpSProtocol);
-    INF_SET_CLSID(MkProtocol);
+
+    static CHAR prot[][21] = {"CLSID_CdlProtocol",
+                              "CLSID_FileProtocol",
+                              "CLSID_FtpProtocol",
+                              "CLSID_GopherProtocol",
+                              "CLSID_HttpProtocol",
+                              "CLSID_HttpSProtocol",
+                              "CLSID_MkProtocol"};
+
+    pse[0].pszName = prot[0];
+    clsids[0] = &CLSID_CdlProtocol;
+    pse[1].pszName = prot[1];
+    clsids[1] = &CLSID_FileProtocol;
+    pse[2].pszName = prot[2];
+    clsids[2] = &CLSID_FtpProtocol;
+    pse[3].pszName = prot[3];
+    clsids[3] = &CLSID_GopherProtocol;
+    pse[4].pszName = prot[4];
+    clsids[4] = &CLSID_HttpProtocol;
+    pse[5].pszName = prot[5];
+    clsids[5] = &CLSID_HttpSProtocol;
+    pse[6].pszName = prot[6];
+    clsids[6] = &CLSID_MkProtocol;
 
     for(i = 0; i < sizeof(pse)/sizeof(pse[0]); i++) {
         pse[i].pszValue = HeapAlloc(GetProcessHeap(), 0, 39);
@@ -618,8 +629,6 @@
     return hres;
 }
 
-#undef INF_SET_CLSID
-
 /***********************************************************************
  *		DllRegisterServer (URLMON.@)
  */



More information about the wine-patches mailing list