comctl32: Fix compiler warnings with flag -Wcast-qual

Mikhail Maroukhine mikolg at yandex.ru
Thu Mar 25 13:51:05 CDT 2010


---
 dlls/comctl32/datetime.c |    2 +-
 dlls/comctl32/listview.c |    2 +-
 dlls/comctl32/tooltips.c |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
index 96d041e..e693d58 100644
--- a/dlls/comctl32/datetime.c
+++ b/dlls/comctl32/datetime.c
@@ -949,7 +949,7 @@ DATETIME_Notify (DATETIME_INFO *infoPtr, const NMHDR *lpnmh)
         DATETIME_SendSimpleNotify(infoPtr, DTN_CLOSEUP);
     }
     if ((lpnmh->hwndFrom == infoPtr->hUpdown) && (lpnmh->code == UDN_DELTAPOS)) {
-        LPNMUPDOWN lpnmud = (LPNMUPDOWN)lpnmh;
+        const NM_UPDOWN *lpnmud = (const NM_UPDOWN*)lpnmh;
         TRACE("Delta pos %d\n", lpnmud->iDelta);
         infoPtr->pendingUpdown = lpnmud->iDelta;
     }
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index de85491..642a8aa 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -802,7 +802,7 @@ static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, const NMHEADE
 
     /* header always supplies unicode notifications,
        all we have to do is to convert strings to ANSI */
-    nmhA = *(NMHEADERA*)lpnmh;
+    nmhA = *(const NMHEADERA*)lpnmh;
     if (lpnmh->pitem)
     {
         hditema = *(HDITEMA*)lpnmh->pitem;
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 083dd07..688d3b5 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -1626,11 +1626,11 @@ TOOLTIPS_SetTitleT (TOOLTIPS_INFO *infoPtr, UINT_PTR uTitleIcon, LPCWSTR pszTitl
         }
         else
         {
-            size = sizeof(WCHAR)*MultiByteToWideChar(CP_ACP, 0, (LPSTR)pszTitle, -1, NULL, 0);
+            size = sizeof(WCHAR)*MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pszTitle, -1, NULL, 0);
             infoPtr->pszTitle = Alloc(size);
             if (!infoPtr->pszTitle)
                 return FALSE;
-            MultiByteToWideChar(CP_ACP, 0, (LPSTR)pszTitle, -1, infoPtr->pszTitle, size/sizeof(WCHAR));
+            MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pszTitle, -1, infoPtr->pszTitle, size/sizeof(WCHAR));
         }
     }
     else
@@ -1729,7 +1729,7 @@ TOOLTIPS_TrackActivate (TOOLTIPS_INFO *infoPtr, BOOL track_activate, const TTTOO
 	    return FALSE;
 
 	/* activate */
-	infoPtr->nTrackTool = TOOLTIPS_GetToolFromInfoT (infoPtr, (TTTOOLINFOW*)ti);
+	infoPtr->nTrackTool = TOOLTIPS_GetToolFromInfoT (infoPtr, (const TTTOOLINFOW*)ti);
 	if (infoPtr->nTrackTool != -1) {
 	    TRACE("activated!\n");
 	    infoPtr->bTrackActive = TRUE;
-- 
1.6.3.3


------------TWRs8o1DoSphpIOnJOAZb6--




More information about the wine-patches mailing list