winmm: Cast-qual warnings fix (1 of 2)

Andrew Talbot Andrew.Talbot at talbotville.com
Wed Nov 22 10:14:45 CST 2006


Changelog:
    winmm: Cast-qual warnings fix.

diff -urN a/dlls/winmm/mci.c b/dlls/winmm/mci.c
--- a/dlls/winmm/mci.c	2006-11-09 17:45:34.000000000 +0000
+++ b/dlls/winmm/mci.c	2006-11-22 14:51:16.000000000 +0000
@@ -304,14 +304,14 @@
             if (dwParam1 & MCI_OPEN_TYPE)
             {
                 if (dwParam1 & MCI_OPEN_TYPE_ID)
-                    mci_openW->lpstrDeviceType = (LPWSTR)mci_openA->lpstrDeviceType;
+                    mci_openW->lpstrDeviceType = (LPCWSTR)mci_openA->lpstrDeviceType;
                 else
                     mci_openW->lpstrDeviceType = MCI_strdupAtoW(mci_openA->lpstrDeviceType);
             }
             if (dwParam1 & MCI_OPEN_ELEMENT)
             {
                 if (dwParam1 & MCI_OPEN_ELEMENT_ID)
-                    mci_openW->lpstrElementName = (LPWSTR)mci_openA->lpstrElementName;
+                    mci_openW->lpstrElementName = (LPCWSTR)mci_openA->lpstrElementName;
                 else
                     mci_openW->lpstrElementName = MCI_strdupAtoW(mci_openA->lpstrElementName);
             }
@@ -980,8 +980,8 @@
  */
 static	DWORD		MCI_GetReturnType(LPCWSTR lpCmd)
 {
-    lpCmd = (LPCWSTR)((BYTE*)(lpCmd + strlenW(lpCmd) + 1) + sizeof(DWORD) + sizeof(WORD));
-    if (*lpCmd == '\0' && *(const WORD*)((BYTE*)(lpCmd + 1) + sizeof(DWORD)) == MCI_RETURN) {
+    lpCmd = (LPCWSTR)((const BYTE*)(lpCmd + strlenW(lpCmd) + 1) + sizeof(DWORD) + sizeof(WORD));
+    if (*lpCmd == '\0' && *(const WORD*)((const BYTE*)(lpCmd + 1) + sizeof(DWORD)) == MCI_RETURN) {
 	return *(const DWORD*)(lpCmd + 1);
     }
     return 0L;



More information about the wine-patches mailing list