The internal intX_t is either int32_t or int64_t depending on platform bitness. Since there is no existing printf format for such an integer, cast it to an int64_t and use the right printf format for that instead. This avoids warnings when building with clang.
Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 1 file). Show all
Unified · Split
| @@ -415,8 +415,8 @@ int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool bFirstSliceInLayer, PNal · 414 unmodified lines | ||
| 415 | 415 | } |
| 416 | 416 | if (iUsedBits > pBs->iBits) { //When BS incomplete, as long as find it, SHOULD stop decoding to avoid mosaic or crash. |
| 417 | 417 | WelsLog (pCtx, WELS_LOG_WARNING, |
| 418 | − "WelsDecodeSlice()::::pBs incomplete, iUsedBits:%d > pBs->iBits:%d, MUST stop decoding.\n", | |
| 419 | − iUsedBits, pBs->iBits); | |
| 418 | + "WelsDecodeSlice()::::pBs incomplete, iUsedBits:%"PRId64" > pBs->iBits:%d, MUST stop decoding.\n", | |
| 419 | + (int64_t) iUsedBits, pBs->iBits); | |
| 420 | 420 | return -1; |
| 421 | 421 | } |
| 422 | 422 | iMbX = iNextMbXyIndex % pCurLayer->iMbWidth; |