summaryrefslogtreecommitdiff
path: root/rbutil/ipodpatcher/ipodio-win32.c
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-09-20 17:03:58 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-09-20 17:03:58 +0000
commit8b32a2d473fff5e1e52a51ad71f0a149f1cc7cf6 (patch)
tree0d4363ce8886f021655b0e901a42bb8f5225d14f /rbutil/ipodpatcher/ipodio-win32.c
parent8163ddeb7ef57cf0c36af5edde1fe323636d595a (diff)
Always format error message using ANSI functions to get rid of type-punning when building with rbutil.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22759 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/ipodpatcher/ipodio-win32.c')
-rw-r--r--rbutil/ipodpatcher/ipodio-win32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rbutil/ipodpatcher/ipodio-win32.c b/rbutil/ipodpatcher/ipodio-win32.c
index 5125c070f8..29391bfa4f 100644
--- a/rbutil/ipodpatcher/ipodio-win32.c
+++ b/rbutil/ipodpatcher/ipodio-win32.c
@@ -56,12 +56,12 @@ static int unlock_volume(HANDLE hDisk)
void print_error(char* msg)
{
- char* pMsgBuf;
+ LPSTR pMsgBuf = NULL;
printf(msg);
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
+ FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&pMsgBuf,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), pMsgBuf,
0, NULL);
printf(pMsgBuf);
LocalFree(pMsgBuf);