mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
9dc1c1a876
commit
c3a908f04b
1 changed files with 3 additions and 3 deletions
|
@ -57,12 +57,12 @@ static int unlock_volume(HANDLE hDisk)
|
||||||
|
|
||||||
void sansa_print_error(char* msg)
|
void sansa_print_error(char* msg)
|
||||||
{
|
{
|
||||||
char* pMsgBuf;
|
LPSTR pMsgBuf = NULL;
|
||||||
|
|
||||||
printf(msg);
|
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(),
|
FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(),
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&pMsgBuf,
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), pMsgBuf,
|
||||||
0, NULL);
|
0, NULL);
|
||||||
printf(pMsgBuf);
|
printf(pMsgBuf);
|
||||||
LocalFree(pMsgBuf);
|
LocalFree(pMsgBuf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue