From 0bc7d25eed08334211ff0509ed1dc167cbde9974 Mon Sep 17 00:00:00 2001 From: Erwan Croze Date: Wed, 24 Jan 2018 10:27:00 +0100 Subject: [PATCH] Fixing compilation problem with Centos7 --- include/linphone/utils/enum-mask.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linphone/utils/enum-mask.h b/include/linphone/utils/enum-mask.h index 5f65fb679..a385401f3 100644 --- a/include/linphone/utils/enum-mask.h +++ b/include/linphone/utils/enum-mask.h @@ -138,6 +138,12 @@ private: return (mMask & value) == value && (value || mMask == 0); } +// On CentOs 7 GCC 4.8.5 have issue with array-bounds +#if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ == 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + static constexpr StorageType init ( typename std::initializer_list::const_iterator begin, typename std::initializer_list::const_iterator end @@ -145,6 +151,10 @@ private: return begin != end ? (StorageType(*begin) | init(begin + 1, end)) : StorageType(0); } +#if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ == 5 +#pragma GCC diagnostic pop +#endif + StorageType mMask; };