diff options
author | archshift <admin@archshift.com> | 2014-07-10 08:28:27 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-07-10 08:28:27 +0200 |
commit | e824cd09b369c47a7f316fccc7577cd923164466 (patch) | |
tree | d8efa178a29955525458a38b1351ea0b609a2a09 /src/OSSupport/Event.cpp | |
parent | EntityEffects.x -> EntityEffect.x, Object-Oriented effects (diff) | |
parent | Merge pull request #1157 from Howaner/Window (diff) | |
download | cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.gz cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.bz2 cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.lz cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.xz cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.zst cuberite-e824cd09b369c47a7f316fccc7577cd923164466.zip |
Diffstat (limited to 'src/OSSupport/Event.cpp')
-rw-r--r-- | src/OSSupport/Event.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/OSSupport/Event.cpp b/src/OSSupport/Event.cpp index 649a0a3cf..72bce4c3c 100644 --- a/src/OSSupport/Event.cpp +++ b/src/OSSupport/Event.cpp @@ -18,7 +18,7 @@ cEvent::cEvent(void) m_Event = CreateEvent(NULL, FALSE, FALSE, 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(); } #else // *nix @@ -71,6 +71,7 @@ cEvent::~cEvent() { sem_destroy(m_Event); delete m_Event; + m_Event = NULL; } #endif } @@ -85,7 +86,7 @@ void cEvent::Wait(void) DWORD res = WaitForSingleObject(m_Event, INFINITE); 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 int res = sem_wait(m_Event); @@ -106,7 +107,7 @@ void cEvent::Set(void) #ifdef _WIN32 if (!SetEvent(m_Event)) { - LOGWARN("cEvent: Could not set cEvent: GLE = %d", GetLastError()); + LOGWARN("cEvent: Could not set cEvent: GLE = %u", (unsigned)GetLastError()); } #else int res = sem_post(m_Event); |