From 9ea9602d95f6d4402a60329e627ecfd1118f17e0 Mon Sep 17 00:00:00 2001 From: CHEN Feng Date: Tue, 29 May 2018 20:14:01 -0400 Subject: [PATCH] Fix more compile warnings on gcc 8.1 --- hash/BUILD | 2 ++ system/threading/semaphore.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hash/BUILD b/hash/BUILD index 2c738f1..c0df6f5 100644 --- a/hash/BUILD +++ b/hash/BUILD @@ -34,6 +34,7 @@ cc_library( ':murmur', '//thirdparty/stringencoders:stringencoders' ], + extra_cppflags = ['-Wno-implicit-fallthrough'], ) cc_library( @@ -52,6 +53,7 @@ cc_library( 'murmur/MurmurHashAligned2.cpp', 'murmur/MurmurHashNeutral2.cpp', ], + extra_cppflags = ['-Wno-implicit-fallthrough'], ) cc_test( diff --git a/system/threading/semaphore.cpp b/system/threading/semaphore.cpp index 3959262..588b000 100644 --- a/system/threading/semaphore.cpp +++ b/system/threading/semaphore.cpp @@ -15,7 +15,7 @@ namespace internal { bool SemaphoreOps::TryAcquire(sem_t* sem) { - if (TOFT_EINTR_IGNORED(sem_trywait(sem) == 0)) + if (TOFT_EINTR_IGNORED(sem_trywait(sem)) == 0) return true; int error = errno; if (error == EAGAIN)