~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to misc.h

  • Committer: noloader
  • Date: 2015-07-12 22:11:35 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:578
Cleared signed/unsigned warning using GCC __builtin_XXX

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
inline unsigned int TrailingZeros(word32 v)
278
278
{
279
279
#if defined(__GNUC__) && CRYPTOPP_GCC_VERSION >= 30400
280
 
        return __builtin_ctz(v);
 
280
        return static_cast<unsigned int>(__builtin_ctz(v));
281
281
#elif defined(_MSC_VER) && _MSC_VER >= 1400
282
282
        unsigned long result;
283
283
        _BitScanForward(&result, v);
296
296
inline unsigned int TrailingZeros(word64 v)
297
297
{
298
298
#if defined(__GNUC__) && CRYPTOPP_GCC_VERSION >= 30400
299
 
        return __builtin_ctzll(v);
 
299
        return static_cast<unsigned int>(__builtin_ctzll(v));
300
300
#elif defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(_M_X64) || defined(_M_IA64))
301
301
        unsigned long result;
302
302
        _BitScanForward64(&result, v);