From 7d898e638abad8267420f8c0d827d21f716b8977 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 1 Aug 2019 14:07:00 +0200 Subject: fix clang warnings --- compat/shm.cpp | 2 +- compat/shm.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'compat') 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: -- cgit v1.2.3