From cab9bda2496c23788c9a1575b110b2e8bdf0269c Mon Sep 17 00:00:00 2001 From: galik Date: Sat, 19 Sep 2015 07:52:30 +0100 Subject: [PATCH] Prevent unused parameter warnings and unknown #pragma warnings on GCC. --- include/array_view.h | 7 +++++-- include/fail_fast.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/array_view.h b/include/array_view.h index 80656a4..907bf42 100644 --- a/include/array_view.h +++ b/include/array_view.h @@ -52,10 +52,12 @@ #endif // _NOEXCEPT +#if _MSC_VER #if _MSC_VER <= 1800 #pragma warning(push) #pragma warning(disable: 4351) // warns about newly introduced aggregate initializer behavior #endif // _MSC_VER <= 1800 +#endif namespace Guide { @@ -547,7 +549,7 @@ namespace details // TODO : following signature is for work around VS bug template BoundsRanges (const OtherType &, bool firstLevel) {} - BoundsRanges(const SizeType * const arr) { } + BoundsRanges(const SizeType * const) { } BoundsRanges() = default; @@ -2281,9 +2283,10 @@ general_array_view_iterator operator+(typename general_array_view_ite } // namespace Guide +#if _MSC_VER #if _MSC_VER <= 1800 #pragma warning(pop) #endif // _MSC_VER <= 1800 - +#endif #pragma pop_macro("_NOEXCEPT") diff --git a/include/fail_fast.h b/include/fail_fast.h index a7385ca..382b9d6 100644 --- a/include/fail_fast.h +++ b/include/fail_fast.h @@ -39,7 +39,7 @@ inline void fail_fast_assert(bool cond, const char* const message) { if (!cond) #else inline void fail_fast_assert(bool cond) { if (!cond) std::terminate(); } -inline void fail_fast_assert(bool cond, const char* const message) { if (!cond) std::terminate(); } +inline void fail_fast_assert(bool cond, const char* const) { if (!cond) std::terminate(); } #endif // SAFER_CPP_TESTING