[x265] Warning in TEncSearch.cpp:2481 due to double assignment?

Steve Borho steve at borho.org
Mon Mar 10 18:57:06 CET 2014


On Mon, Mar 10, 2014 at 8:25 AM, Mario *LigH* Rohkrämer <contact at ligh.de> wrote:
> +----
> h:/MSYS/home/Entwicklung/x265/source/Lib/TLibEncoder/TEncSearch.cpp: In
> member function 'void x265::TEncSearch::xMergeEstimation(x265::TComDataCU*,
> int, uint32_t&, x265::TComMvField*, uint32_t&, uint32_t&, uint32_t&,
> x265::TComMvField*, x265::UChar*, int&)':
> h:/MSYS/home/Entwicklung/x265/source/Lib/TLibEncoder/TEncSearch.cpp:2481:52:
> warning: operation on 'bitsCand' may be undefined [-Wsequence-point]
>          uint32_t bitsCand = bitsCand = mergeCand + 1;
>                                                     ^
> +----
>
> Is it a bug (copy+paste+paste) or a feature to have a double "bitsCand ="
> assignment in the same line?

Yeah, a cut-paste bug.  I'm still amazed clang didn't catch this, it
usually finds more warnings than gcc.  I've pushed a fix for it.

-- 
Steve Borho


More information about the x265-devel mailing list