Fixed defects

List of Defects

Error: COMPILER_WARNING (CWE-563): [#def1]
libmediainfo-24.01-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: At global scope
libmediainfo-24.01-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:54:20: warning[-Wunused-variable]: ‘MediaInfoLib::ADM_Dolby_1_1’ defined but not used
#   54 | static const char* ADM_Dolby_1_1 = " (additional constraint from Dolby Atmos Master ADM Profile v1.1)";
#      |                    ^~~~~~~~~~~~~
#   52|   

#   53|   static const char* ADM_Dolby_1_0 = " (additional constraint from Dolby Atmos Master ADM Profile v1.0)";

#   54|-> static const char* ADM_Dolby_1_1 = " (additional constraint from Dolby Atmos Master ADM Profile v1.1)";

#   55|   

#   56|   //---------------------------------------------------------------------------


Error: COMPILER_WARNING (CWE-457): [#def2]
libmediainfo-24.01-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In member function ‘MediaInfoLib::File_Adm::Streams_Fill()’
libmediainfo-24.01-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3035:41: warning[-Wmaybe-uninitialized]: ‘ChannelAssignment’ may be used uninitialized
# 3035 |                                     if (ChannelAssignment != (size_t)-1 && speakerLabel_ChannelAssignment != ChannelAssignment) {
#      |                                         ^~~~~~~~~~~~~~~~~
libmediainfo-24.01-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:2944:38: note: ‘ChannelAssignment’ was declared here
# 2944 |         atmos_audioChannelFormatName ChannelAssignment;
#      |                                      ^~~~~~~~~~~~~~~~~
# 3033|                                   }

# 3034|                                   else {

# 3035|->                                     if (ChannelAssignment != (size_t)-1 && speakerLabel_ChannelAssignment != ChannelAssignment) {

# 3036|                                           ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":speakerLabel:speakerLabel element value " + speakerLabel + " is not permitted, permitted value is " + Atmos_audioChannelFormat_Content[ChannelAssignment].SpeakerLabel + "" + ADM_Dolby_1_0);

# 3037|                                       }


Error: COMPILER_WARNING (CWE-563): [#def3]
libmediainfo-24.01-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3233:15: warning[-Wunused-variable]: unused variable ‘TrackUID’
# 3233 |         auto& TrackUID = TrackUIDs[i];
#      |               ^~~~~~~~
# 3231|       // Errors - TrackUID

# 3232|       for (size_t i = 0; i < TrackUIDs.size(); i++) {

# 3233|->         auto& TrackUID = TrackUIDs[i];

# 3234|       }

# 3235|   


Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-127.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namelibmediainfo-24.04-1.fc41
diffbase-store-results-to/tmp/tmp931vxqip/libmediainfo-24.04-1.fc41.tar.xz
diffbase-time-created2024-07-03 15:57:13
diffbase-time-finished2024-07-03 16:03:55
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp931vxqip/libmediainfo-24.04-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp931vxqip/libmediainfo-24.04-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-127.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibmediainfo-24.01-1.fc40
store-results-to/tmp/tmpoh583ro7/libmediainfo-24.01-1.fc40.tar.xz
time-created2024-07-03 15:49:40
time-finished2024-07-03 15:56:46
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpoh583ro7/libmediainfo-24.01-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpoh583ro7/libmediainfo-24.01-1.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9