Skip to content

Commit

Permalink
libsmackerdec: Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendricks266 committed Oct 5, 2023
1 parent 60aa2f3 commit e8135da
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/libsmackerdec/src/SmackerDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ int SmackerDecoder::DecodeFrame(uint32_t frameSize)
*/
int SmackerDecoder::DecodeAudio(uint32_t size, SmackerAudioTrack &track)
{
HuffContext h[4];
HuffContext h[4]{};
SmackerCommon::VLCtable vlc[4];
int val;
int i, res;
Expand Down Expand Up @@ -993,8 +993,6 @@ int SmackerDecoder::DecodeAudio(uint32_t size, SmackerAudioTrack &track)
return -1;
}

memset(h, 0, sizeof(HuffContext) * 4);

// Initialize
for (i = 0; i < (1 << (sampleBits + stereo)); i++) {
h[i].length = 256;
Expand Down Expand Up @@ -1122,7 +1120,7 @@ void SmackerDecoder::GotoFrame(uint32_t frameNum)
currentFrame = 0;
nextPos = firstFrameFilePos;

for (int i = 0; i < frameNum + 1; i++)
for (uint32_t i = 0; i < frameNum + 1; i++)
GetNextFrame();
}

Expand Down

0 comments on commit e8135da

Please sign in to comment.