[flac-dev] PATCH for bitmath.h, part 2

lvqcl lvqcl.mail at gmail.com
Mon Aug 19 08:59:30 PDT 2013


I noticed another problem, now with _BitScanReverse64:

--- a\src\libFLAC\include\private\bitmath.h	2013-08-16 23:02:38.869769500 +0400
+++ b\src\libFLAC\include\private\bitmath.h	2013-08-19 18:46:37.424494400 +0400
@@ -136,9 +136,9 @@
      return sizeof(FLAC__uint64) * CHAR_BIT - 1 - __builtin_clzll(v);
  /* Sorry, only supported in win64/Itanium.. */
  #elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && (defined(_M_IA64) || defined(_WIN64))
-    FLAC__uint64 idx;
+    unsigned long idx;
      _BitScanReverse64(&idx, v);
-    return idx ^ 63U;
+    return (unsigned)idx ^ 63U;
  #else
  /* Brain-damaged compilers will use the fastest possible way that is,
      de Bruijn sequences (http://supertech.csail.mit.edu/papers/debruijn.pdf)


More information about the flac-dev mailing list