1
0

Fixed printf formats for Win builds

This commit is contained in:
madmaxoft 2014-06-30 22:37:26 +02:00
parent 0dfaad4123
commit 7177806d31
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ cEvent::cEvent(void)
m_Event = CreateEvent(NULL, FALSE, FALSE, NULL); m_Event = CreateEvent(NULL, FALSE, FALSE, NULL);
if (m_Event == NULL) if (m_Event == NULL)
{ {
LOGERROR("cEvent: cannot create event, GLE = %d. Aborting server.", GetLastError()); LOGERROR("cEvent: cannot create event, GLE = %u. Aborting server.", (unsigned)GetLastError());
abort(); abort();
} }
#else // *nix #else // *nix
@ -86,7 +86,7 @@ void cEvent::Wait(void)
DWORD res = WaitForSingleObject(m_Event, INFINITE); DWORD res = WaitForSingleObject(m_Event, INFINITE);
if (res != WAIT_OBJECT_0) if (res != WAIT_OBJECT_0)
{ {
LOGWARN("cEvent: waiting for the event failed: %d, GLE = %d. Continuing, but server may be unstable.", res, GetLastError()); LOGWARN("cEvent: waiting for the event failed: %u, GLE = %u. Continuing, but server may be unstable.", (unsigned)res, (unsigned)GetLastError());
} }
#else #else
int res = sem_wait(m_Event); int res = sem_wait(m_Event);
@ -107,7 +107,7 @@ void cEvent::Set(void)
#ifdef _WIN32 #ifdef _WIN32
if (!SetEvent(m_Event)) if (!SetEvent(m_Event))
{ {
LOGWARN("cEvent: Could not set cEvent: GLE = %d", GetLastError()); LOGWARN("cEvent: Could not set cEvent: GLE = %u", (unsigned)GetLastError());
} }
#else #else
int res = sem_post(m_Event); int res = sem_post(m_Event);

View File

@ -90,7 +90,7 @@ bool cIsThread::Start(void)
m_Handle = CreateThread(NULL, 0, thrExecute, this, CREATE_SUSPENDED, &m_ThreadID); m_Handle = CreateThread(NULL, 0, thrExecute, this, CREATE_SUSPENDED, &m_ThreadID);
if (m_Handle == NULL) if (m_Handle == NULL)
{ {
LOGERROR("ERROR: Could not create thread \"%s\", GLE = %d!", m_ThreadName.c_str(), GetLastError()); LOGERROR("ERROR: Could not create thread \"%s\", GLE = %u!", m_ThreadName.c_str(), (unsigned)GetLastError());
return false; return false;
} }
ResumeThread(m_Handle); ResumeThread(m_Handle);