From: khizmax Date: Mon, 3 Nov 2014 18:16:43 +0000 (+0300) Subject: Fix compiler warnings for padding option X-Git-Tag: v2.0.0~138 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=028d82bdc915c23fb4c041164d2fcaa9da55bf36;p=libcds.git Fix compiler warnings for padding option --- diff --git a/cds/opt/options.h b/cds/opt/options.h index 458a9102..ecd6ea68 100644 --- a/cds/opt/options.h +++ b/cds/opt/options.h @@ -399,7 +399,7 @@ namespace opt { //@endcond /// Special padding constants for \p cds::opt::padding option - enum special_pading { + enum special_padding { no_special_padding = 0, ///< no special padding cache_line_padding = 1, ///< use cache line size defined in cds/user_setup/cache_line.h @@ -498,8 +498,8 @@ namespace opt { public: static CDS_CONSTEXPR const size_t c_nPadding = - padding == cache_line_padding ? cds::c_nCacheLineSize : - padding == no_special_padding ? 0 : padding ; + static_cast(padding) == static_cast(cache_line_padding) ? cds::c_nCacheLineSize : + static_cast(padding) == static_cast(no_special_padding) ? 0 : padding; static_assert( (c_nPadding & (c_nPadding - 1)) == 0, "Padding must be a power-of-two number" );