summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:07:00 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:07:00 +0200
commit7d898e638abad8267420f8c0d827d21f716b8977 (patch)
tree897a31950ba0a345f05162e4e8616f26e1b69446 /compat
parentb930dd608bf95ecc3f89007313ba8ab8b1935ee5 (diff)
fix clang warnings
Diffstat (limited to 'compat')
-rw-r--r--compat/shm.cpp2
-rw-r--r--compat/shm.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/compat/shm.cpp b/compat/shm.cpp
index 1f863190..f59469dc 100644
--- a/compat/shm.cpp
+++ b/compat/shm.cpp
@@ -106,7 +106,7 @@ shm_wrapper::shm_wrapper(const char *shm_name, const char* /*mutex_name*/, int m
strcat(filename, shm_name);
fd = shm_open(filename, O_RDWR | O_CREAT, 0600);
(void) ftruncate(fd, map_size);
- mem = mmap(NULL, map_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t)0);
+ mem = mmap(nullptr, map_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t)0);
}
shm_wrapper::~shm_wrapper()
diff --git a/compat/shm.h b/compat/shm.h
index ece693ea..d1363219 100644
--- a/compat/shm.h
+++ b/compat/shm.h
@@ -28,7 +28,8 @@ class OTR_COMPAT_EXPORT shm_wrapper final
#if defined(_WIN32)
HANDLE mutex, mapped_file;
#else
- int fd, size;
+ int fd;
+ unsigned size;
#endif
public: