[Scummvm-cvs-logs] scummvm master -> b0cd614fd5a9b89765c7c3890a830abddc6d14f2

lordhoto lordhoto at gmail.com
Tue Mar 8 20:25:30 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b0cd614fd5 WINCE: Silence/fix some warnings.


Commit: b0cd614fd5a9b89765c7c3890a830abddc6d14f2
    https://github.com/scummvm/scummvm/commit/b0cd614fd5a9b89765c7c3890a830abddc6d14f2
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-03-08T11:23:31-08:00

Commit Message:
WINCE: Silence/fix some warnings.

Changed paths:
    backends/platform/wince/CEDevice.cpp
    backends/platform/wince/missing/missing.cpp



diff --git a/backends/platform/wince/CEDevice.cpp b/backends/platform/wince/CEDevice.cpp
index 3686944..f90d5e2 100644
--- a/backends/platform/wince/CEDevice.cpp
+++ b/backends/platform/wince/CEDevice.cpp
@@ -85,13 +85,12 @@ void CEDevice::init() {
 	// 2003+ power management code borrowed from MoDaCo & Betaplayer. Thanks !
 	HINSTANCE dll = LoadLibrary(TEXT("aygshell.dll"));
 	if (dll) {
-		*(FARPROC*)&_SHIdleTimerReset = GetProcAddress(dll, MAKEINTRESOURCE(2006));
+		_SHIdleTimerReset = (void (*)())GetProcAddress(dll, MAKEINTRESOURCE(2006));
 	}
 	dll = LoadLibrary(TEXT("coredll.dll"));
 	if (dll) {
-		*(FARPROC*)&_SetPowerRequirement = GetProcAddress(dll, TEXT("SetPowerRequirement"));
-		*(FARPROC*)&_ReleasePowerRequirement = GetProcAddress(dll, TEXT("ReleasePowerRequirement"));
-
+		_SetPowerRequirement = (HANDLE (*)(PVOID,int,ULONG,PVOID,ULONG))GetProcAddress(dll, TEXT("SetPowerRequirement"));
+		_ReleasePowerRequirement = (DWORD (*)(HANDLE))GetProcAddress(dll, TEXT("ReleasePowerRequirement"));
 	}
 	if (_SetPowerRequirement)
 		_hPowerManagement = _SetPowerRequirement((PVOID) TEXT("BKL1:"), 0, 1, (PVOID) NULL, 0);
diff --git a/backends/platform/wince/missing/missing.cpp b/backends/platform/wince/missing/missing.cpp
index 92af3e6..7de706b 100644
--- a/backends/platform/wince/missing/missing.cpp
+++ b/backends/platform/wince/missing/missing.cpp
@@ -63,7 +63,7 @@ void *bsearch(const void *key, const void *base, size_t nmemb,
 		else if (tmp > 0)
 			lo = mid + 1;
 		else
-			return (void *)p;
+			return const_cast<void *>(p);
 	}
 
 	return NULL;
@@ -158,7 +158,7 @@ int _access(const char *path, int mode) {
 		// hits for files that don't exist. TRIPLE checking for the same fname
 		// seems to weed out those false positives.
 		// Exhibited in kyra engine.
-		HANDLE h = FindFirstFile(fname, &ffd);
+		h = FindFirstFile(fname, &ffd);
 		FindClose(h);
 		if (h == INVALID_HANDLE_VALUE)
 			return -1;  //Can't find file






More information about the Scummvm-git-logs mailing list