From 0dafbee35ca945eb66b8ae6713e21acdd066751c Mon Sep 17 00:00:00 2001 From: Urs Fleisch Date: Sat, 14 Dec 2024 07:12:50 +0100 Subject: [PATCH] Fix shadowVariable issues reported by cppcheck cppcheck --enable=all --inline-suppr \ --suppress=noExplicitConstructor --suppress=unusedFunction \ --suppress=missingIncludeSystem --project=compile_commands.json --- taglib/shn/shnfile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/taglib/shn/shnfile.cpp b/taglib/shn/shnfile.cpp index ffb54b6e..15ae9c15 100644 --- a/taglib/shn/shnfile.cpp +++ b/taglib/shn/shnfile.cpp @@ -408,9 +408,9 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) return; } - auto channelCount = chunkData.toUShort(offset, false); + auto fmtChannelCount = chunkData.toUShort(offset, false); offset += 2; - if(props.channelCount != channelCount) + if(props.channelCount != fmtChannelCount) debug("SHN::File::read() -- Channel count mismatch between Shorten and 'fmt ' chunk."); props.sampleRate = static_cast(chunkData.toUInt(offset, false)); @@ -480,9 +480,9 @@ void SHN::File::read(AudioProperties::ReadStyle propertiesStyle) return; } - auto channelCount = chunkData.toUShort(offset, true); + auto commChannelCount = chunkData.toUShort(offset, true); offset += 2; - if(props.channelCount != channelCount) + if(props.channelCount != commChannelCount) debug("SHN::File::read() -- Channel count mismatch between Shorten and 'COMM' chunk."); props.sampleFrames = static_cast(chunkData.toUInt(offset, true));