Skip to content

Commit

Permalink
WINCE: Silence/fix some warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Mar 8, 2011
1 parent 0e7dc36 commit b0cd614
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions backends/platform/wince/CEDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions backends/platform/wince/missing/missing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b0cd614

Please sign in to comment.