summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-12-09 19:04:02 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-12-09 19:04:02 +0000
commitc3a908f04b578b391ecc86198368cc22a742d105 (patch)
tree2c00eea3284f14ecefd5355dbba27fa40f738f86 /rbutil
parent9dc1c1a876089392b088a2f2295c7ea5c75e2f6a (diff)
downloadrockbox-c3a908f04b578b391ecc86198368cc22a742d105.tar.gz
rockbox-c3a908f04b578b391ecc86198368cc22a742d105.tar.bz2
rockbox-c3a908f04b578b391ecc86198368cc22a742d105.zip
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@23913 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/sansapatcher/sansaio-win32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rbutil/sansapatcher/sansaio-win32.c b/rbutil/sansapatcher/sansaio-win32.c
index c27092762a..5797eae2aa 100644
--- a/rbutil/sansapatcher/sansaio-win32.c
+++ b/rbutil/sansapatcher/sansaio-win32.c
@@ -57,12 +57,12 @@ static int unlock_volume(HANDLE hDisk)
void sansa_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);