From 42fe45beebf064be922d85a21eb869c0b949ab32 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 16 Jul 2018 15:01:26 +0000 Subject: Fix warnings in a static assert added to CFI. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337178 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/cfi/cfi.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cfi/cfi.cc b/lib/cfi/cfi.cc index 5ee836569..a2f127f93 100644 --- a/lib/cfi/cfi.cc +++ b/lib/cfi/cfi.cc @@ -134,7 +134,8 @@ void ShadowBuilder::AddUnchecked(uptr begin, uptr end) { uint16_t *shadow_end = MemToShadow(end - 1, shadow_) + 1; // memset takes a byte, so our unchecked shadow value requires both bytes to // be the same. Make sure we're ok during compilation. - static_assert(kUncheckedShadow & 0xff == ((kUncheckedShadow >> 8) & 0xff)); + static_assert((kUncheckedShadow & 0xff) == ((kUncheckedShadow >> 8) & 0xff), + "Both bytes of the 16-bit value must be the same!"); memset(shadow_begin, kUncheckedShadow & 0xff, (shadow_end - shadow_begin) * sizeof(*shadow_begin)); } -- cgit v1.2.3