From: khizmax Date: Thu, 11 May 2017 18:31:20 +0000 (+0300) Subject: Try to disable CLang "unused private field" warning X-Git-Tag: v2.3.0~36 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e2a4aa99cc7d69854468416daf0f043d368b7abd;p=libcds.git Try to disable CLang "unused private field" warning --- diff --git a/cds/algo/atomic.h b/cds/algo/atomic.h index dd6de400..c138bc9b 100644 --- a/cds/algo/atomic.h +++ b/cds/algo/atomic.h @@ -305,6 +305,11 @@ namespace cds { } }; +#if CDS_COMPILER == CDS_COMPILER_CLANG + // CLang unhappy: pad1_ and pad2_ - unused private field warning +# pragma GCC diagnostic push +# pragma GCC diagnistic ignored "-Wunused-private-field" +#endif /// Atomic cache-friendly item counter /** Atomic item counter with cache-line padding to avoid false sharing. @@ -418,7 +423,9 @@ namespace cds { m_Counter.store( 0, order ); } }; - +#if CDS_COMPILER == CDS_COMPILER_CLANG +# pragma GCC diagnostic pop +#endif /// Empty item counter /**