[x265] [PATCH] threadpool: fix warning: ‘int popCount(uint64_t)’ defined but not used [-Wunused-function]

Mateusz mateuszb at poczta.onet.pl
Mon May 30 15:13:03 CEST 2016


There is a serious bug in threadpool code that prevent working in Windows XP/Vista.
VS 2015 error when compiling for 32-bit Windows XP:
(ClCompile target) ->
  I:\vs\x265\source\common\threadpool.cpp(590): error C3861: 'GetNumaNodeProcessorMaskEx': identifier not found [I:\vs\x265\ma\
8-b\common\common.vcxproj]

Did you see patch https://patches.videolan.org/patch/13495/ (it fixes also this warning)?


W dniu 2016-05-30 o 14:45, praveen at multicorewareinc.com pisze:
> # HG changeset patch
> # User Praveen Tiwari <praveen at multicorewareinc.com>
> # Date 1464585837 -19800
> #      Mon May 30 10:53:57 2016 +0530
> # Node ID b8dbe8d7c09e7fc0b7cce236569fc5df2eb70b1e
> # Parent  aeade2e8d8688ebffb8455b8948d89d6a72e2c38
> threadpool: fix warning: ‘int popCount(uint64_t)’ defined but not used [-Wunused-function]
>  static int popCount(uint64_t x)
> 
> diff -r aeade2e8d868 -r b8dbe8d7c09e source/common/threadpool.cpp
> --- a/source/common/threadpool.cpp	Thu May 26 16:45:09 2016 +0530
> +++ b/source/common/threadpool.cpp	Mon May 30 10:53:57 2016 +0530
> @@ -68,6 +68,7 @@
>  # define strcasecmp _stricmp
>  #endif
>  
> +#if defined(_WIN32_WINNT) && _WIN32_WINNT >= _WIN32_WINNT_WIN7
>  const uint64_t m1 = 0x5555555555555555; //binary: 0101...
>  const uint64_t m2 = 0x3333333333333333; //binary: 00110011..
>  const uint64_t m3 = 0x0f0f0f0f0f0f0f0f; //binary:  4 zeros,  4 ones ...
> @@ -80,6 +81,7 @@
>      x = (x + (x >> 4)) & m3;
>      return (x * h01) >> 56;
>  }
> +#endif
>  
>  namespace X265_NS {
>  // x265 private namespace
> 
> 
> 
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
> 




More information about the x265-devel mailing list