summaryrefslogtreecommitdiffhomepage
path: root/compat/compat.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-22 15:19:01 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-22 15:19:01 +0200
commit350edf6e5c1f253a300fd0b7db6591082558d937 (patch)
treea6787e1e3c7243da416f1dc9828f113cbbdcbaa4 /compat/compat.cpp
parenta42c19579c5c7a980c2826c7e015821d2e4d4b1d (diff)
needless compat api breakage
Diffstat (limited to 'compat/compat.cpp')
-rw-r--r--compat/compat.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/compat/compat.cpp b/compat/compat.cpp
index 7b695617..b5d63f2b 100644
--- a/compat/compat.cpp
+++ b/compat/compat.cpp
@@ -4,12 +4,12 @@
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*/
+
+#include <cstring>
#define IN_FTNOIR_COMPAT
#include "compat.h"
-#include <string.h>
#if defined(_WIN32)
-
PortableLockedShm::PortableLockedShm(const char* shmName, const char* mutexName, int mapSize)
{
hMutex = CreateMutexA(NULL, false, mutexName);
@@ -43,8 +43,8 @@ void PortableLockedShm::unlock()
{
(void) ReleaseMutex(hMutex);
}
-
#else
+#pragma GCC diagnostic ignored "-Wunused-result"
PortableLockedShm::PortableLockedShm(const char *shmName, const char* /*mutexName*/, int mapSize) : size(mapSize)
{
char filename[512] = {0};
@@ -57,8 +57,6 @@ PortableLockedShm::PortableLockedShm(const char *shmName, const char* /*mutexNam
PortableLockedShm::~PortableLockedShm()
{
- //(void) shm_unlink(shm_filename);
-
(void) munmap(mem, size);
(void) close(fd);
}
@@ -72,7 +70,6 @@ void PortableLockedShm::unlock()
{
flock(fd, LOCK_UN);
}
-
#endif
bool PortableLockedShm::success()