Fix cppcheck issues

This commit is contained in:
badaix 2023-12-30 11:37:35 +01:00
parent d894cd1853
commit 6e786255e1
11 changed files with 33 additions and 19 deletions

View file

@ -155,7 +155,7 @@ cs::time_point_clk Stream::getNextPlayerChunk(void* outputBuffer, uint32_t frame
cs::time_point_clk Stream::getNextPlayerChunk(void* outputBuffer, uint32_t frames, int32_t framesCorrection)
{
if (framesCorrection < 0 && frames + framesCorrection <= 0)
if (framesCorrection < 0 && (static_cast<int32_t>(frames) + framesCorrection <= 0))
{
// Avoid underflow in new char[] constructor.
framesCorrection = -static_cast<int32_t>(frames) + 1;