openh264
openh264 copied to clipboard
gcc 4.9.2/5.1.0 detects uninitialized variable in codec/decoder/core/src/mv_pred.cpp when compiling tests
codec/decoder/core/src/mv_pred.cpp: In function ‘void WelsDec::PredPSkipMvFromNeighbor(WelsDec::PDqLayer, int16_t*)’:
codec/decoder/core/src/mv_pred.cpp:158:51: error: ‘iLeftTopXy’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
ST32 (iMvD, LD32 (pCurLayer->pMv[0][iLeftTopXy][15]));
^
codec/decoder/core/src/mv_pred.cpp:99:71: error: ‘iLeftXy’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
iLeftType = ((iCurX != 0 && bLeftAvail) ? pCurLayer->pMbType[iLeftXy] : 0);
^
cc1plus: all warnings being treated as errors
Full output: https://gist.github.com/b9717bb9f32c43d15209 It works with gcc-4.8.4 and clang 3.6.0/3.6.1.
Actually, gcc 5.1.0 doesn't detect second one, only the first (iLeftTopXy). Might be gcc bug?
@HaiboZhu
This bug has been fixed in #2535 and no warnings output on newest GCC 5.4, close this issue.