mirror of
https://github.com/taglib/taglib.git
synced 2026-02-14 20:23:03 -05:00
Fix issues reported by Clang Static Analyzer
Some deadcode.DeadStores.
On Debian 12:
CXXFLAGS=-I/usr/include/x86_64-linux-gnu/c++/12 \
cmake -DCMAKE_C_COMPILER=/usr/share/clang/scan-build-14/libexec/ccc-analyzer \
-DCMAKE_CXX_COMPILER=/usr/share/clang/scan-build-14/libexec/c++-analyzer \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
-DENABLE_CCACHE=ON -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON \
-DCMAKE_BUILD_TYPE=Debug ../taglib
scan-build make
This commit is contained in:
@ -122,13 +122,13 @@ void Opus::Properties::read(File *file)
|
||||
|
||||
// *Input Sample Rate* (32 bits, unsigned, little endian)
|
||||
d->inputSampleRate = data.toUInt(pos, false);
|
||||
pos += 4;
|
||||
// pos += 4;
|
||||
|
||||
// *Output Gain* (16 bits, signed, little endian)
|
||||
pos += 2;
|
||||
// pos += 2;
|
||||
|
||||
// *Channel Mapping Family* (8 bits, unsigned)
|
||||
pos += 1;
|
||||
// pos += 1;
|
||||
|
||||
const Ogg::PageHeader *first = file->firstPageHeader();
|
||||
const Ogg::PageHeader *last = file->lastPageHeader();
|
||||
|
||||
@ -141,8 +141,8 @@ void Speex::Properties::read(File *file)
|
||||
|
||||
// vbr; /**< 1 for a VBR encoding, 0 otherwise */
|
||||
d->vbr = data.toUInt(pos, false) == 1;
|
||||
pos += 4;
|
||||
|
||||
// pos += 4;
|
||||
// frames_per_packet; /**< Number of frames stored per Ogg packet */
|
||||
// unsigned int framesPerPacket = data.mid(pos, 4).toUInt(false);
|
||||
|
||||
|
||||
@ -145,7 +145,6 @@ void Vorbis::Properties::read(File *file)
|
||||
pos += 4;
|
||||
|
||||
d->bitrateMinimum = data.toUInt(pos, false);
|
||||
pos += 4;
|
||||
|
||||
// Find the length of the file. See http://wiki.xiph.org/VorbisStreamLength/
|
||||
// for my notes on the topic.
|
||||
|
||||
Reference in New Issue
Block a user