SF.net SVN: geany: [2456] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Tue Apr 8 15:00:16 UTC 2008


Revision: 2456
          http://geany.svn.sourceforge.net/geany/?rev=2456&view=rev
Author:   eht16
Date:     2008-04-08 08:00:06 -0700 (Tue, 08 Apr 2008)

Log Message:
-----------
Fix compiler warnings by correct type casting.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/win32.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-04-08 14:44:34 UTC (rev 2455)
+++ trunk/ChangeLog	2008-04-08 15:00:06 UTC (rev 2456)
@@ -8,6 +8,8 @@
  * Makefile.am, scripts/intl_stats.sh, po/intl_stats.sh:
    Move intl_stats.sh script back to po directory to not have to
    include the scripts directory in the distribution.
+ * src/win32.c:
+   Fix compiler warnings by correct type casting.
 
 
 2008-04-06  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>

Modified: trunk/src/win32.c
===================================================================
--- trunk/src/win32.c	2008-04-08 14:44:34 UTC (rev 2455)
+++ trunk/src/win32.c	2008-04-08 15:00:06 UTC (rev 2456)
@@ -1145,6 +1145,8 @@
 	HRESULT hres;
 	IShellLinkW *pslW = NULL;
 	IPersistFile *ppf = NULL;
+	LPVOID pslWV = NULL;
+	LPVOID ppfV = NULL;
 
 	/* Check if the file is empty first because IShellLink::Resolve for some reason succeeds
 	 * with an empty file and returns an empty "link target". (#524151) */
@@ -1160,18 +1162,20 @@
 	CoInitialize(NULL);
 
 	hres = CoCreateInstance(
-		&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID *) &pslW);
+		&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, &pslWV);
 
 	if (SUCCEEDED(hres))
 	{
 		/* The IShellLink interface supports the IPersistFile interface.
 		 * Get an interface pointer to it. */
-		hres = pslW->lpVtbl->QueryInterface(pslW, &IID_IPersistFile, (LPVOID *) &ppf);
+		pslW = (IShellLinkW*) pslWV;
+		hres = pslW->lpVtbl->QueryInterface(pslW, &IID_IPersistFile, &ppfV);
 	}     
 
 	if (SUCCEEDED(hres))
 	{
 		/* Load the file. */
+		ppf = (IPersistFile*) ppfV;
 		hres = ppf->lpVtbl->Load(ppf, link, STGM_READ);
 	}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list