Newly introduced defects

List of Defects

Error: COMPILER_WARNING: [#def1]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Ac3.cpp:215:20: warning: ‘AC3_roomtyp’ initialized and declared ‘extern’
#  215 | extern const char* AC3_roomtyp[]=
#      |                    ^~~~~~~~~~~
#  213|   

#  214|   //---------------------------------------------------------------------------

#  215|-> extern const char* AC3_roomtyp[]=

#  216|   {

#  217|       "Large",


Error: COMPILER_WARNING: [#def2]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Ac3.cpp:223:20: warning: ‘AC3_dmixmod’ initialized and declared ‘extern’
#  223 | extern const char* AC3_dmixmod[]=
#      |                    ^~~~~~~~~~~
#  221|   

#  222|   //---------------------------------------------------------------------------

#  223|-> extern const char* AC3_dmixmod[]=

#  224|   {

#  225|       "Lt/Rt",


Error: COMPILER_WARNING (CWE-1164): [#def3]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: At global scope
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:107:16: warning[-Wunused-function]: ‘ZenLib::float32 MediaInfoLib::TimeCodeToFloat(std::string)’ defined but not used
#  107 | static float32 TimeCodeToFloat(string v)
#      |                ^~~~~~~~~~~~~~~
#  105|   }

#  106|   

#  107|-> static float32 TimeCodeToFloat(string v)

#  108|   {

#  109|       if (v.size() < 8 || v[2] != ':' || v[5] != ':')


Error: COMPILER_WARNING (CWE-682): [#def4]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: At global scope
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:1247:49: warning[-Wsizeof-array-div]: expression does not compute the number of elements in this array; element type is ‘MediaInfoLib::element_item’, not ‘MediaInfoLib::attribute_item’
# 1247 | static_assert(sizeof(audioTrackFormat_Elements) / sizeof(attribute_item) == audioTrackFormat_Element_Max, IncoherencyMessage);
#      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:1247:51: note: add parentheses around ‘sizeof (MediaInfoLib::attribute_item)’ to silence this warning
# 1247 | static_assert(sizeof(audioTrackFormat_Elements) / sizeof(attribute_item) == audioTrackFormat_Element_Max, IncoherencyMessage);
#      |                                                   ^~~~~~~~~~~~~~~~~~~~~~
#      |                                                   (                     )
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:1243:22: note: array ‘MediaInfoLib::audioTrackFormat_Elements’ declared here
# 1243 | static element_items audioTrackFormat_Elements =
#      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
# 1245|       { "audioStreamFormatIDRef"                  , { 0, 7, 0, 1, 0, 0, 1, 0, 1, 1, 0 } },

# 1246|   };

# 1247|-> static_assert(sizeof(audioTrackFormat_Elements) / sizeof(attribute_item) == audioTrackFormat_Element_Max, IncoherencyMessage);

# 1248|   

# 1249|   static attribute_items audioStreamFormat_Attributes =


Error: COMPILER_WARNING (CWE-195): [#def5]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:2260:17: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’
# 2260 |         if (Pos == -1) {
#      |             ~~~~^~~~~
# 2258|               }

# 2259|           }

# 2260|->         if (Pos == -1) {

# 2261|               auto LinkedTo_Pos = P_And_LinkedTo.find(" LinkedTo_TrackUID_Pos");

# 2262|               auto HasTransport = !F.Retrieve_Const(Stream_Audio, 0, "Transport0").empty();


Error: COMPILER_WARNING: [#def6]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::loudnessMetadata_Check(file_adm_private*, item)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3196:68: warning[-Wenum-compare]: enumerated mismatch in conditional expression: ‘MediaInfoLib::audioProgramme_Element’ vs ‘MediaInfoLib::audioContent_Element’
# 3196 |     size_t j = Programme.Elements[Item_Type == item_audioProgramme ? audioProgramme_loudnessMetadata : audioContent_loudnessMetadata].size() - 1;
#      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 3194|   

# 3195|       size_t i = Programmes.size() - 1;

# 3196|->     size_t j = Programme.Elements[Item_Type == item_audioProgramme ? audioProgramme_loudnessMetadata : audioContent_loudnessMetadata].size() - 1;

# 3197|   

# 3198|       if (loudnessMetadata.Elements[loudnessMetadata_integratedLoudness].empty() && loudnessMetadata.Elements[loudnessMetadata_dialogueLoudness].empty())


Error: COMPILER_WARNING (CWE-563): [#def7]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::audioProgrammeReferenceScreen_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3210:11: warning[-Wunused-variable]: unused variable ‘ProgrammeReferenceScreen’
# 3210 |     auto& ProgrammeReferenceScreen = ProgrammeReferenceScreens.back();
#      |           ^~~~~~~~~~~~~~~~~~~~~~~~
# 3208|       auto& Programme = Programmes.back();

# 3209|       auto& ProgrammeReferenceScreens = Items[item_audioProgrammeReferenceScreen].Items;

# 3210|->     auto& ProgrammeReferenceScreen = ProgrammeReferenceScreens.back();

# 3211|   

# 3212|       size_t i = Programmes.size() - 1;


Error: COMPILER_WARNING (CWE-563): [#def8]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3212:12: warning[-Wunused-variable]: unused variable ‘i’
# 3212 |     size_t i = Programmes.size() - 1;
#      |            ^
# 3210|       auto& ProgrammeReferenceScreen = ProgrammeReferenceScreens.back();

# 3211|   

# 3212|->     size_t i = Programmes.size() - 1;

# 3213|       size_t j = Programme.Elements[audioProgramme_audioProgrammeReferenceScreen].size() - 1;

# 3214|   


Error: COMPILER_WARNING (CWE-563): [#def9]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3213:12: warning[-Wunused-variable]: unused variable ‘j’
# 3213 |     size_t j = Programme.Elements[audioProgramme_audioProgrammeReferenceScreen].size() - 1;
#      |            ^
# 3211|   

# 3212|       size_t i = Programmes.size() - 1;

# 3213|->     size_t j = Programme.Elements[audioProgramme_audioProgrammeReferenceScreen].size() - 1;

# 3214|   

# 3215|       MoveErrors(File_Adm_Private, item_audioProgrammeReferenceScreen);


Error: COMPILER_WARNING (CWE-563): [#def10]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3228:12: warning[-Wunused-variable]: unused variable ‘i’
# 3228 |     size_t i = Programmes.size() - 1;
#      |            ^
# 3226|       auto& screenWidth = screenWidths.back();

# 3227|   

# 3228|->     size_t i = Programmes.size() - 1;

# 3229|       size_t j = Programme.Elements[audioProgramme_audioProgrammeReferenceScreen].size() - 1;

# 3230|       size_t k = ProgrammeReferenceScreen.Elements[audioProgrammeReferenceScreen_screenWidth].size() - 1;


Error: COMPILER_WARNING (CWE-563): [#def11]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3229:12: warning[-Wunused-variable]: unused variable ‘j’
# 3229 |     size_t j = Programme.Elements[audioProgramme_audioProgrammeReferenceScreen].size() - 1;
#      |            ^
# 3227|   

# 3228|       size_t i = Programmes.size() - 1;

# 3229|->     size_t j = Programme.Elements[audioProgramme_audioProgrammeReferenceScreen].size() - 1;

# 3230|       size_t k = ProgrammeReferenceScreen.Elements[audioProgrammeReferenceScreen_screenWidth].size() - 1;

# 3231|   


Error: COMPILER_WARNING (CWE-563): [#def12]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3230:12: warning[-Wunused-variable]: unused variable ‘k’
# 3230 |     size_t k = ProgrammeReferenceScreen.Elements[audioProgrammeReferenceScreen_screenWidth].size() - 1;
#      |            ^
# 3228|       size_t i = Programmes.size() - 1;

# 3229|       size_t j = Programme.Elements[audioProgramme_audioProgrammeReferenceScreen].size() - 1;

# 3230|->     size_t k = ProgrammeReferenceScreen.Elements[audioProgrammeReferenceScreen_screenWidth].size() - 1;

# 3231|   

# 3232|       if (screenWidth.Attributes_Present[screenWidth_X]) {


Error: COMPILER_WARNING (CWE-563): [#def13]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::authoringInformation_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3251:11: warning[-Wunused-variable]: unused variable ‘authoringInformation’
# 3251 |     auto& authoringInformation = authoringInformations.back();
#      |           ^~~~~~~~~~~~~~~~~~~~
# 3249|       auto& Programme = Programmes.back();

# 3250|       auto& authoringInformations = Items[item_authoringInformation].Items;

# 3251|->     auto& authoringInformation = authoringInformations.back();

# 3252|   

# 3253|       size_t i = Programmes.size() - 1;


Error: COMPILER_WARNING (CWE-563): [#def14]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3253:12: warning[-Wunused-variable]: unused variable ‘i’
# 3253 |     size_t i = Programmes.size() - 1;
#      |            ^
# 3251|       auto& authoringInformation = authoringInformations.back();

# 3252|   

# 3253|->     size_t i = Programmes.size() - 1;

# 3254|       size_t j = Programme.Elements[audioProgramme_authoringInformation].size() - 1;

# 3255|   


Error: COMPILER_WARNING (CWE-563): [#def15]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3254:12: warning[-Wunused-variable]: unused variable ‘j’
# 3254 |     size_t j = Programme.Elements[audioProgramme_authoringInformation].size() - 1;
#      |            ^
# 3252|   

# 3253|       size_t i = Programmes.size() - 1;

# 3254|->     size_t j = Programme.Elements[audioProgramme_authoringInformation].size() - 1;

# 3255|   

# 3256|   


Error: COMPILER_WARNING (CWE-563): [#def16]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::audioProgramme_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3271:12: warning[-Wunused-variable]: unused variable ‘i’
# 3271 |     size_t i = Programmes.size() - 1;
#      |            ^
# 3269|       auto& Programme = Programmes.back();

# 3270|   

# 3271|->     size_t i = Programmes.size() - 1;

# 3272|   

# 3273|       CheckError_Language(File_Adm_Private, item_audioProgramme, audioProgramme_audioProgrammeLanguage);


Error: COMPILER_WARNING (CWE-563): [#def17]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::audioObjectInteraction_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3351:11: warning[-Wunused-variable]: unused variable ‘audioObjectInteraction’
# 3351 |     auto& audioObjectInteraction = audioObjectInteractions.back();
#      |           ^~~~~~~~~~~~~~~~~~~~~~
# 3349|       auto& audioObject = audioObjects.back();

# 3350|       auto& audioObjectInteractions = Items[item_audioObjectInteraction].Items;

# 3351|->     auto& audioObjectInteraction = audioObjectInteractions.back();

# 3352|   

# 3353|       size_t i = audioObjects.size() - 1;


Error: COMPILER_WARNING (CWE-563): [#def18]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3353:12: warning[-Wunused-variable]: unused variable ‘i’
# 3353 |     size_t i = audioObjects.size() - 1;
#      |            ^
# 3351|       auto& audioObjectInteraction = audioObjectInteractions.back();

# 3352|   

# 3353|->     size_t i = audioObjects.size() - 1;

# 3354|       size_t j = audioObject.Elements[audioObject_audioObjectInteraction].size() - 1;

# 3355|   


Error: COMPILER_WARNING (CWE-563): [#def19]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3354:12: warning[-Wunused-variable]: unused variable ‘j’
# 3354 |     size_t j = audioObject.Elements[audioObject_audioObjectInteraction].size() - 1;
#      |            ^
# 3352|   

# 3353|       size_t i = audioObjects.size() - 1;

# 3354|->     size_t j = audioObject.Elements[audioObject_audioObjectInteraction].size() - 1;

# 3355|   

# 3356|       MoveErrors(File_Adm_Private, item_audioObjectInteraction);


Error: COMPILER_WARNING (CWE-563): [#def20]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::Object_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3363:11: warning[-Wunused-variable]: unused variable ‘Object’
# 3363 |     auto& Object = Objects.back();
#      |           ^~~~~~
# 3361|       auto& Items = File_Adm_Private->Items;

# 3362|       auto& Objects = Items[item_audioObject].Items;

# 3363|->     auto& Object = Objects.back();

# 3364|   

# 3365|       size_t i = Objects.size() - 1;


Error: COMPILER_WARNING (CWE-563): [#def21]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3365:12: warning[-Wunused-variable]: unused variable ‘i’
# 3365 |     size_t i = Objects.size() - 1;
#      |            ^
# 3363|       auto& Object = Objects.back();

# 3364|   

# 3365|->     size_t i = Objects.size() - 1;

# 3366|   

# 3367|       MoveErrors(File_Adm_Private, item_audioObject);


Error: COMPILER_WARNING (CWE-195): [#def22]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3522:35: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 3522 |         if (End - Element.c_str() != Element.size()) {
#      |             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
# 3520|           char* End;

# 3521|           auto Value = strtof(Element.c_str(), &End);

# 3522|->         if (End - Element.c_str() != Element.size()) {

# 3523|               BlockFormat.AddError(Error, ":importance:importance element value \"" + Element + "\" is malformed");

# 3524|           }


Error: COMPILER_WARNING (CWE-457): [#def23]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘MediaInfoLib::audioBlockFormat_Check(MediaInfoLib::file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3533:64: warning[-Wmaybe-uninitialized]: ‘Gains_Not0_Pos’ may be used uninitialized
# 3533 |                 BlockFormat.AddError(Error, ":gain" + to_string(Gains_Not0_Pos) + ":gain element value \"" + Gains_Not0 + "\" is not permitted, permitted value is 0 due to importance element value not 0", Source_Atmos_1_0);
#      |                                                       ~~~~~~~~~^~~~~~~~~~~~~~~~
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3502:12: note: ‘Gains_Not0_Pos’ was declared here
# 3502 |     size_t Gains_Not0_Pos;
#      |            ^~~~~~~~~~~~~~
# 3531|               }

# 3532|               else {

# 3533|->                 BlockFormat.AddError(Error, ":gain" + to_string(Gains_Not0_Pos) + ":gain element value \"" + Gains_Not0 + "\" is not permitted, permitted value is 0 due to importance element value not 0", Source_Atmos_1_0);

# 3534|               }

# 3535|           }


Error: COMPILER_WARNING (CWE-1023): [#def24]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3547:16: warning[-Wswitch]: enumeration value ‘Type_DirectSpeakers’ not handled in switch
# 3545|       switch (jumpPositions.size()) {

# 3546|       case 0:

# 3547|->         switch (Type) {

# 3548|           case Type_Objects:

# 3549|               BlockFormat.AddError(Error, ":jumpPosition:jumpPosition element is not present", Source_Atmos_1_0);


Error: COMPILER_WARNING (CWE-1023): [#def25]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3553:16: warning[-Wswitch]: enumeration value ‘Type_Binaural’ not handled in switch
# 3551|           break;

# 3552|       default:

# 3553|->         switch (Type) {

# 3554|           case Type_DirectSpeakers:

# 3555|               BlockFormat.AddError(Error, ":GeneralCompliance:jumpPosition subelement count " + to_string(jumpPositions.size()) + " is not permitted, max is 1", Source_Atmos_1_0);


Error: COMPILER_WARNING (CWE-1023): [#def26]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3553:16: warning[-Wswitch]: enumeration value ‘Type_HOA’ not handled in switch
# 3551|           break;

# 3552|       default:

# 3553|->         switch (Type) {

# 3554|           case Type_DirectSpeakers:

# 3555|               BlockFormat.AddError(Error, ":GeneralCompliance:jumpPosition subelement count " + to_string(jumpPositions.size()) + " is not permitted, max is 1", Source_Atmos_1_0);


Error: COMPILER_WARNING (CWE-1023): [#def27]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3553:16: warning[-Wswitch]: enumeration value ‘Type_Matrix’ not handled in switch
# 3551|           break;

# 3552|       default:

# 3553|->         switch (Type) {

# 3554|           case Type_DirectSpeakers:

# 3555|               BlockFormat.AddError(Error, ":GeneralCompliance:jumpPosition subelement count " + to_string(jumpPositions.size()) + " is not permitted, max is 1", Source_Atmos_1_0);


Error: COMPILER_WARNING (CWE-1023): [#def28]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3553:16: warning[-Wswitch]: enumeration value ‘Type_Max’ not handled in switch
# 3551|           break;

# 3552|       default:

# 3553|->         switch (Type) {

# 3554|           case Type_DirectSpeakers:

# 3555|               BlockFormat.AddError(Error, ":GeneralCompliance:jumpPosition subelement count " + to_string(jumpPositions.size()) + " is not permitted, max is 1", Source_Atmos_1_0);


Error: COMPILER_WARNING (CWE-1023): [#def29]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3553:16: warning[-Wswitch]: enumeration value ‘Type_Unknown’ not handled in switch
# 3553 |         switch (Type) {
#      |                ^
# 3551|           break;

# 3552|       default:

# 3553|->         switch (Type) {

# 3554|           case Type_DirectSpeakers:

# 3555|               BlockFormat.AddError(Error, ":GeneralCompliance:jumpPosition subelement count " + to_string(jumpPositions.size()) + " is not permitted, max is 1", Source_Atmos_1_0);


Error: COMPILER_WARNING (CWE-1023): [#def30]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3560:16: warning[-Wswitch]: enumeration value ‘Type_Binaural’ not handled in switch
# 3558|           // Fallthrough

# 3559|       case 1:

# 3560|->         switch (Type) {

# 3561|           case Type_Objects: {

# 3562|               const auto& jumpPositions_Items = Items[item_jumpPosition].Items;


Error: COMPILER_WARNING (CWE-1023): [#def31]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3560:16: warning[-Wswitch]: enumeration value ‘Type_DirectSpeakers’ not handled in switch
# 3558|           // Fallthrough

# 3559|       case 1:

# 3560|->         switch (Type) {

# 3561|           case Type_Objects: {

# 3562|               const auto& jumpPositions_Items = Items[item_jumpPosition].Items;


Error: COMPILER_WARNING (CWE-1023): [#def32]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3560:16: warning[-Wswitch]: enumeration value ‘Type_HOA’ not handled in switch
# 3558|           // Fallthrough

# 3559|       case 1:

# 3560|->         switch (Type) {

# 3561|           case Type_Objects: {

# 3562|               const auto& jumpPositions_Items = Items[item_jumpPosition].Items;


Error: COMPILER_WARNING (CWE-1023): [#def33]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3560:16: warning[-Wswitch]: enumeration value ‘Type_Matrix’ not handled in switch
# 3558|           // Fallthrough

# 3559|       case 1:

# 3560|->         switch (Type) {

# 3561|           case Type_Objects: {

# 3562|               const auto& jumpPositions_Items = Items[item_jumpPosition].Items;


Error: COMPILER_WARNING (CWE-1023): [#def34]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3560:16: warning[-Wswitch]: enumeration value ‘Type_Max’ not handled in switch
# 3558|           // Fallthrough

# 3559|       case 1:

# 3560|->         switch (Type) {

# 3561|           case Type_Objects: {

# 3562|               const auto& jumpPositions_Items = Items[item_jumpPosition].Items;


Error: COMPILER_WARNING (CWE-1023): [#def35]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3560:16: warning[-Wswitch]: enumeration value ‘Type_Unknown’ not handled in switch
# 3560 |         switch (Type) {
#      |                ^
# 3558|           // Fallthrough

# 3559|       case 1:

# 3560|->         switch (Type) {

# 3561|           case Type_Objects: {

# 3562|               const auto& jumpPositions_Items = Items[item_jumpPosition].Items;


Error: COMPILER_WARNING (CWE-195): [#def36]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3568:55: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 3568 |                 if (End - interpolationLength.c_str() != interpolationLength.size()) {
#      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 3566|                   char* End;

# 3567|                   auto Value = strtof(interpolationLength.c_str(), &End);

# 3568|->                 if (End - interpolationLength.c_str() != interpolationLength.size()) {

# 3569|                       BlockFormat.AddError(Error, ":jumpPosition0:interpolationLength:interpolationLength attribute value \"" + interpolationLength + "\" is malformed");

# 3570|                   }


Error: COMPILER_WARNING (CWE-1023): [#def37]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3654:12: warning[-Wswitch]: enumeration value ‘Type_Binaural’ not handled in switch
# 3652|           };

# 3653|       atmos_audioChannelFormatName speakerLabel_ChannelAssignment = (atmos_audioChannelFormatName)-1;

# 3654|->     switch (Type) {

# 3655|       case Type_DirectSpeakers: {

# 3656|           const audioBlockFormat_Element BlockFormat_DirectSpeakers_List[] = { audioBlockFormat_cartesian, audioBlockFormat_speakerLabel, audioBlockFormat_position }; // TODO: cartesian is not in specs but lot of files have it


Error: COMPILER_WARNING (CWE-1023): [#def38]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3654:12: warning[-Wswitch]: enumeration value ‘Type_HOA’ not handled in switch
# 3652|           };

# 3653|       atmos_audioChannelFormatName speakerLabel_ChannelAssignment = (atmos_audioChannelFormatName)-1;

# 3654|->     switch (Type) {

# 3655|       case Type_DirectSpeakers: {

# 3656|           const audioBlockFormat_Element BlockFormat_DirectSpeakers_List[] = { audioBlockFormat_cartesian, audioBlockFormat_speakerLabel, audioBlockFormat_position }; // TODO: cartesian is not in specs but lot of files have it


Error: COMPILER_WARNING (CWE-1023): [#def39]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3654:12: warning[-Wswitch]: enumeration value ‘Type_Matrix’ not handled in switch
# 3652|           };

# 3653|       atmos_audioChannelFormatName speakerLabel_ChannelAssignment = (atmos_audioChannelFormatName)-1;

# 3654|->     switch (Type) {

# 3655|       case Type_DirectSpeakers: {

# 3656|           const audioBlockFormat_Element BlockFormat_DirectSpeakers_List[] = { audioBlockFormat_cartesian, audioBlockFormat_speakerLabel, audioBlockFormat_position }; // TODO: cartesian is not in specs but lot of files have it


Error: COMPILER_WARNING (CWE-1023): [#def40]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3654:12: warning[-Wswitch]: enumeration value ‘Type_Max’ not handled in switch
# 3652|           };

# 3653|       atmos_audioChannelFormatName speakerLabel_ChannelAssignment = (atmos_audioChannelFormatName)-1;

# 3654|->     switch (Type) {

# 3655|       case Type_DirectSpeakers: {

# 3656|           const audioBlockFormat_Element BlockFormat_DirectSpeakers_List[] = { audioBlockFormat_cartesian, audioBlockFormat_speakerLabel, audioBlockFormat_position }; // TODO: cartesian is not in specs but lot of files have it


Error: COMPILER_WARNING (CWE-1023): [#def41]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3654:12: warning[-Wswitch]: enumeration value ‘Type_Objects’ not handled in switch
# 3652|           };

# 3653|       atmos_audioChannelFormatName speakerLabel_ChannelAssignment = (atmos_audioChannelFormatName)-1;

# 3654|->     switch (Type) {

# 3655|       case Type_DirectSpeakers: {

# 3656|           const audioBlockFormat_Element BlockFormat_DirectSpeakers_List[] = { audioBlockFormat_cartesian, audioBlockFormat_speakerLabel, audioBlockFormat_position }; // TODO: cartesian is not in specs but lot of files have it


Error: COMPILER_WARNING (CWE-1023): [#def42]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3654:12: warning[-Wswitch]: enumeration value ‘Type_Unknown’ not handled in switch
# 3654 |     switch (Type) {
#      |            ^
# 3652|           };

# 3653|       atmos_audioChannelFormatName speakerLabel_ChannelAssignment = (atmos_audioChannelFormatName)-1;

# 3654|->     switch (Type) {

# 3655|       case Type_DirectSpeakers: {

# 3656|           const audioBlockFormat_Element BlockFormat_DirectSpeakers_List[] = { audioBlockFormat_cartesian, audioBlockFormat_speakerLabel, audioBlockFormat_position }; // TODO: cartesian is not in specs but lot of files have it


Error: COMPILER_WARNING (CWE-195): [#def43]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3770:47: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 3770 |                     if (End - Element.c_str() != Element.size()) {
#      |                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
# 3768|                       char* End;

# 3769|                       auto Value = strtof(Element.c_str(), &End);

# 3770|->                     if (End - Element.c_str() != Element.size()) {

# 3771|                           BlockFormat.AddError(Error, ":position" + to_string(k) + ":GeneralCompliance:position element value \"" + BlockFormat.Elements[audioBlockFormat_position][k] + "\" is malformed");

# 3772|                       }


Error: COMPILER_WARNING (CWE-195): [#def44]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3814:47: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 3814 |                     if (End - Element.c_str() != Element.size()) {
#      |                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
# 3812|                       char* End;

# 3813|                       Values[Pos] = strtof(Element.c_str(), &End);

# 3814|->                     if (End - Element.c_str() != Element.size()) {

# 3815|                           ValuesAreNok = true;

# 3816|                           BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + " element value \"" + Element + "\" is malformed");


Error: COMPILER_WARNING (CWE-195): [#def45]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3872:43: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 3872 |                 if (End - Element.c_str() < Element.size()) {
#      |                     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
# 3870|                   char* End;

# 3871|                   auto Value = strtof(Element.c_str(), &End);

# 3872|->                 if (End - Element.c_str() < Element.size()) {

# 3873|                       BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + " element value \"" + Element + "\" is malformed");

# 3874|                   }


Error: COMPILER_WARNING (CWE-195): [#def46]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3896:30: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘int’
# 3896 |             if (is_cartesian != File_Adm_Private->CartesianAlreadyNotCoherent - cartesian_0) {
#      |                 ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 3894|               break;

# 3895|           default:

# 3896|->             if (is_cartesian != File_Adm_Private->CartesianAlreadyNotCoherent - cartesian_0) {

# 3897|                   BlockFormat.AddError(Error, ":cartesian:cartesian element values are not consistant between audioBlockFormat elements", Source_AdvSSE_1);

# 3898|                   File_Adm_Private->CartesianAlreadyNotCoherent = cartesian_alreadyincoherent;


Error: COMPILER_WARNING (CWE-563): [#def47]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3926:12: warning[-Wunused-variable]: unused variable ‘i’
# 3926 |     size_t i = ChannelFormats.size() - 1;
#      |            ^
# 3924|       auto& Gain = Gains.back();

# 3925|   

# 3926|->     size_t i = ChannelFormats.size() - 1;

# 3927|       size_t j = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size() - 1;

# 3928|   


Error: COMPILER_WARNING (CWE-563): [#def48]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3927:12: warning[-Wunused-variable]: unused variable ‘j’
# 3927 |     size_t j = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size() - 1;
#      |            ^
# 3925|   

# 3926|       size_t i = ChannelFormats.size() - 1;

# 3927|->     size_t j = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size() - 1;

# 3928|   

# 3929|       static const char* gain_List[] = { "linear", "dB" };


Error: COMPILER_WARNING (CWE-195): [#def49]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::gain_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3950:29: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 3950 |     if (End - Value.c_str() != Value.size()) {
#      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
# 3948|       char* End;

# 3949|       auto Float = strtod(Value.c_str(), &End);

# 3950|->     if (End - Value.c_str() != Value.size()) {

# 3951|           BlockFormat.AddError(Error, audioBlockFormat_gain, E::Form, File_Adm_Private, Value);

# 3952|       }


Error: COMPILER_WARNING (CWE-195): [#def50]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::coefficient_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:3993:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 3993 |         if (End - Value.c_str() != Value.size()) {
#      |             ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
# 3991|           char* End;

# 3992|           auto Float = strtod(Value.c_str(), &End);

# 3993|->         if (End - Value.c_str() != Value.size()) {

# 3994|               Coefficient.AddError(Error, coefficient_gain, E::Form, File_Adm_Private, Value);

# 3995|           }


Error: COMPILER_WARNING (CWE-563): [#def51]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::matrix_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4018:11: warning[-Wunused-variable]: unused variable ‘BlockFormat’
# 4018 |     auto& BlockFormat = BlockFormats.back();
#      |           ^~~~~~~~~~~
# 4016|       auto& ChannelFormat = ChannelFormats.back();

# 4017|       auto& BlockFormats = Items[item_audioBlockFormat].Items;

# 4018|->     auto& BlockFormat = BlockFormats.back();

# 4019|       auto& Matrixes = Items[item_matrix].Items;

# 4020|       auto& Matrix = Matrixes.back();


Error: COMPILER_WARNING (CWE-563): [#def52]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4020:11: warning[-Wunused-variable]: unused variable ‘Matrix’
# 4020 |     auto& Matrix = Matrixes.back();
#      |           ^~~~~~
# 4018|       auto& BlockFormat = BlockFormats.back();

# 4019|       auto& Matrixes = Items[item_matrix].Items;

# 4020|->     auto& Matrix = Matrixes.back();

# 4021|   

# 4022|       while (File_Adm_Private->ChannelFormat_Matrix_coefficients.size() < ChannelFormats.size()) {


Error: COMPILER_WARNING (CWE-563): [#def53]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4040:11: warning[-Wunused-variable]: unused variable ‘ChannelFormat’
# 4040 |     auto& ChannelFormat = ChannelFormats.back();
#      |           ^~~~~~~~~~~~~
# 4038|       auto& Items = File_Adm_Private->Items;

# 4039|       auto& ChannelFormats = Items[item_audioChannelFormat].Items;

# 4040|->     auto& ChannelFormat = ChannelFormats.back();

# 4041|       auto& BlockFormats = Items[item_audioBlockFormat].Items;

# 4042|       auto& BlockFormat = BlockFormats.back();


Error: COMPILER_WARNING (CWE-195): [#def54]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::objectDivergence_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4054:35: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 4054 |         if (End - Element.c_str() != Element.size()) {
#      |             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
# 4052|           char* End;

# 4053|           auto Value = strtof(Element.c_str(), &End);

# 4054|->         if (End - Element.c_str() != Element.size()) {

# 4055|               objectDivergence.AddError(Error, 0x80 | (char)objectDivergence_azimuthRange, E::Form, File_Adm_Private, Element);

# 4056|           }


Error: COMPILER_WARNING (CWE-195): [#def55]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4067:35: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 4067 |         if (End - Element.c_str() != Element.size()) {
#      |             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
# 4065|           char* End;

# 4066|           auto Value = strtof(Element.c_str(), &End);

# 4067|->         if (End - Element.c_str() != Element.size()) {

# 4068|               objectDivergence.AddError(Error, 0x80 | (char)objectDivergence_positionRange, E::Form, File_Adm_Private, Element);

# 4069|           }


Error: COMPILER_WARNING (CWE-195): [#def56]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4078:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 4078 |     if (End - Element.c_str() != Element.size()) {
#      |         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
# 4076|       char* End;

# 4077|       auto Value = strtof(Element.c_str(), &End);

# 4078|->     if (End - Element.c_str() != Element.size()) {

# 4079|           BlockFormat.AddError(Error, (char)audioBlockFormat_objectDivergence, E::Form, File_Adm_Private, Element);

# 4080|       }


Error: COMPILER_WARNING (CWE-563): [#def57]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4097:12: warning[-Wunused-variable]: unused variable ‘i’
# 4097 |     size_t i = ChannelFormats.size() - 1;
#      |            ^
# 4095|       auto& Zones = Items[item_zone].Items;

# 4096|   

# 4097|->     size_t i = ChannelFormats.size() - 1;

# 4098|       size_t j = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size() - 1;

# 4099|       size_t zoneExclusion_Count = BlockFormat.Elements[audioBlockFormat_zoneExclusion].size();


Error: COMPILER_WARNING (CWE-563): [#def58]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4098:12: warning[-Wunused-variable]: unused variable ‘j’
# 4098 |     size_t j = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size() - 1;
#      |            ^
# 4096|   

# 4097|       size_t i = ChannelFormats.size() - 1;

# 4098|->     size_t j = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size() - 1;

# 4099|       size_t zoneExclusion_Count = BlockFormat.Elements[audioBlockFormat_zoneExclusion].size();

# 4100|       size_t zoneExclusion_Pos = ZoneExclusions.size() - zoneExclusion_Count;


Error: COMPILER_WARNING (CWE-563): [#def59]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4100:12: warning[-Wunused-variable]: unused variable ‘zoneExclusion_Pos’
# 4100 |     size_t zoneExclusion_Pos = ZoneExclusions.size() - zoneExclusion_Count;
#      |            ^~~~~~~~~~~~~~~~~
# 4098|       size_t j = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size() - 1;

# 4099|       size_t zoneExclusion_Count = BlockFormat.Elements[audioBlockFormat_zoneExclusion].size();

# 4100|->     size_t zoneExclusion_Pos = ZoneExclusions.size() - zoneExclusion_Count;

# 4101|       size_t zone_Count = ZoneExclusion.Elements[zoneExclusion_zone].size();

# 4102|       size_t zone_Pos = Zones.size() - zone_Count;


Error: COMPILER_WARNING (CWE-681): [#def60]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::zoneExclusion_Check(file_adm_private*)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4133:32: warning[-Woverflow]: overflow in conversion from ‘long unsigned int’ to ‘int’ changes value from ‘18446744073709551615’ to ‘-1’
# 4133 |                 is_cartesian = (unsigned long)-1;
#      |                                ^~~~~~~~~~~~~~~~~
# 4131|               }

# 4132|               else {

# 4133|->                 is_cartesian = (unsigned long)-1;

# 4134|               }

# 4135|   


Error: COMPILER_WARNING (CWE-195): [#def61]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4145:53: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 4145 |                         if (End - Attribute.c_str() != Attribute.size()) {
#      |                             ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
# 4143|                           char* End;

# 4144|                           Values.Values[m] = strtof(Attribute.c_str(), &End);

# 4145|->                         if (End - Attribute.c_str() != Attribute.size()) {

# 4146|                               ValuesAreNok = true;

# 4147|                               const auto& Info = (*item_Infos[item_zone].Attribute_Infos)[m];


Error: COMPILER_WARNING (CWE-195): [#def62]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4165:60: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘int’
# 4165 |                     if (position_Channezone_PoslAssignment == -1) {
#      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
# 4163|                   if (!ValuesAreNok) {

# 4164|                       auto position_Channezone_PoslAssignment = Atmos_zone_Pos(Values.Name, Values.Values);

# 4165|->                     if (position_Channezone_PoslAssignment == -1) {

# 4166|                           BlockFormat.AddError(Error, ":zoneExclusion" + to_string(k) + ":zone" + to_string(l) + ":GeneralCompliance:zone@minX maxX minY maxY minZ maxZ attributes and element value \"" + Zone.Attributes[zone_minX] + "\" \"" + Zone.Attributes[zone_maxX] + "\" \"" + Zone.Attributes[zone_minY] + "\" \"" + Zone.Attributes[zone_maxY] + "\" \"" + Zone.Attributes[zone_minZ] + "\" \"" + Zone.Attributes[zone_maxZ] + "\" \"" + ZoneExclusion.Elements[zoneExclusion_zone][l] + "\" is not valid", S [...]
# 4167|                       }

libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4165:60: note: trimmed 1 message(s) with length over 512

Error: COMPILER_WARNING (CWE-563): [#def63]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In member function ‘int MediaInfoLib::file_adm_private::audioFormatExtended()’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:4778:11: warning[-Wunused-variable]: unused variable ‘Items_Up’
# 4778 |     auto& Items_Up = Items_audioFormatExtended;
#      |           ^~~~~~~~
# 4776|       Item_Struct& audioFormatExtended_Content = Items[item_audioFormatExtended].Items.back();

# 4777|       auto& Items_audioFormatExtended = Items[item_audioFormatExtended].Items;

# 4778|->     auto& Items_Up = Items_audioFormatExtended;

# 4779|       XML_BEGIN

# 4780|       XML_ATTR_START


Error: COMPILER_WARNING (CWE-563): [#def64]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In member function ‘int MediaInfoLib::file_adm_private::frameHeader()’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5153:11: warning[-Wunused-variable]: unused variable ‘Items_Up’
# 5153 |     auto& Items_Up = Items_frameHeader;
#      |           ^~~~~~~~
# 5151|       Item_Struct& frameHeader_Content = Items[item_frameHeader].Items.back();

# 5152|       auto& Items_frameHeader = Items[item_frameHeader].Items;

# 5153|->     auto& Items_Up = Items_frameHeader;

# 5154|       XML_BEGIN

# 5155|       XML_ATTR_START


Error: COMPILER_WARNING (CWE-563): [#def65]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In function ‘void MediaInfoLib::FillErrors(file_adm_private*, item, size_t, const char*, std::vector<std::__cxx11::basic_string<char> >*, std::vector<std::__cxx11::basic_string<char> >*, bool, size_t*, bool)’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5262:40: warning[-Wunused-variable]: unused variable ‘Element_Infos’
# 5262 |                             const auto Element_Infos = item_Infos[item_Type2].Element_Infos;
#      |                                        ^~~~~~~~~~~~~
# 5260|                               Value_Pos--;

# 5261|                               item_Type2 = (item)Value[Value_Pos];

# 5262|->                             const auto Element_Infos = item_Infos[item_Type2].Element_Infos;

# 5263|                               Field += CraftName(item_Infos[item_Type2].Name) + to_string(j) + ' ';

# 5264|                           }


Error: COMPILER_WARNING (CWE-823): [#def66]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5275:44: warning[-Wchar-subscripts]: array subscript has type ‘char’
# 5275 |                         Value += E_Strings[ErrorType];
#      |                                            ^~~~~~~~~
# 5273|                           Value += IsAttribute ? "attribute" : "element";

# 5274|                           Value += ' ';

# 5275|->                         Value += E_Strings[ErrorType];

# 5276|                           auto Pos = Value.find("{}");

# 5277|                           if (Pos != string::npos) {


Error: COMPILER_WARNING (CWE-195): [#def67]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5282:42: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘const char’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’}
# 5282 |                                 if (Opt0 < File_Adm_Private->Errors_Tips[k][l].size()) {
#      |                                     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 5280|                               case E::Form:

# 5281|                               case E::Permitted:

# 5282|->                                 if (Opt0 < File_Adm_Private->Errors_Tips[k][l].size()) {

# 5283|                                       Value.insert(Pos, File_Adm_Private->Errors_Tips[k][l][Opt0]);

# 5284|                                   }


Error: COMPILER_WARNING (CWE-195): [#def68]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp: scope_hint: In member function ‘virtual void MediaInfoLib::File_Adm::Streams_Fill()’
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5505:30: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’
# 5505 |         for (size_t j = 0; j < (PosCommon == 0 ? 1 : PosCommon); j++)
#      |                            ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 5503|               }

# 5504|           }

# 5505|->         for (size_t j = 0; j < (PosCommon == 0 ? 1 : PosCommon); j++)

# 5506|           {

# 5507|               if (profileInfos[0].Strings[j].empty()) {


Error: COMPILER_WARNING (CWE-195): [#def69]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5510:100: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’
# 5510 |             Fill(Stream_Audio, 0, (string("AdmProfile_") + profile_names_InternalID[j]).c_str(), j < PosCommon ? profileInfos[0].Strings[j] : "Multiple");
#      |                                                                                                  ~~^~~~~~~~~~~
# 5508|                   continue;

# 5509|               }

# 5510|->             Fill(Stream_Audio, 0, (string("AdmProfile_") + profile_names_InternalID[j]).c_str(), j < PosCommon ? profileInfos[0].Strings[j] : "Multiple");

# 5511|               Fill_SetOptions(Stream_Audio, 0, (string("AdmProfile_") + profile_names_InternalID[j]).c_str(), "N NTY");

# 5512|           }


Error: COMPILER_WARNING (CWE-563): [#def70]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5784:18: warning[-Wunused-but-set-variable]: variable ‘HasChannelLayout’ set but not used
# 5784 |             bool HasChannelLayout = false;
#      |                  ^~~~~~~~~~~~~~~~
# 5782|           for (size_t j = 0; j < Source.Elements[audioPackFormat_audioChannelFormatIDRef].size(); j++) {

# 5783|               const string& ID = Source.Elements[audioPackFormat_audioChannelFormatIDRef][j];

# 5784|->             bool HasChannelLayout = false;

# 5785|               for (size_t k = 0; k < Dest.Items.size(); k++) {

# 5786|                   if (Dest.Items[k].Attributes[audioChannelFormat_audioChannelFormatID] != ID) {


Error: COMPILER_WARNING (CWE-563): [#def71]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5901:11: warning[-Wunused-variable]: unused variable ‘BlockFormats’
# 5901 |     auto& BlockFormats = File_Adm_Private->Items[item_audioBlockFormat].Items;
#      |           ^~~~~~~~~~~~
# 5899|       auto& TrackFormats = File_Adm_Private->Items[item_audioTrackFormat].Items;

# 5900|       auto& TrackUIDs = File_Adm_Private->Items[item_audioTrackUID].Items;

# 5901|->     auto& BlockFormats = File_Adm_Private->Items[item_audioBlockFormat].Items;

# 5902|       auto& Positions = File_Adm_Private->Items[item_position].Items;

# 5903|       auto& ZoneExclusions = File_Adm_Private->Items[item_zoneExclusion].Items;


Error: COMPILER_WARNING (CWE-563): [#def72]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5902:11: warning[-Wunused-variable]: unused variable ‘Positions’
# 5902 |     auto& Positions = File_Adm_Private->Items[item_position].Items;
#      |           ^~~~~~~~~
# 5900|       auto& TrackUIDs = File_Adm_Private->Items[item_audioTrackUID].Items;

# 5901|       auto& BlockFormats = File_Adm_Private->Items[item_audioBlockFormat].Items;

# 5902|->     auto& Positions = File_Adm_Private->Items[item_position].Items;

# 5903|       auto& ZoneExclusions = File_Adm_Private->Items[item_zoneExclusion].Items;

# 5904|       auto& Zones = File_Adm_Private->Items[item_zone].Items;


Error: COMPILER_WARNING (CWE-563): [#def73]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5903:11: warning[-Wunused-variable]: unused variable ‘ZoneExclusions’
# 5903 |     auto& ZoneExclusions = File_Adm_Private->Items[item_zoneExclusion].Items;
#      |           ^~~~~~~~~~~~~~
# 5901|       auto& BlockFormats = File_Adm_Private->Items[item_audioBlockFormat].Items;

# 5902|       auto& Positions = File_Adm_Private->Items[item_position].Items;

# 5903|->     auto& ZoneExclusions = File_Adm_Private->Items[item_zoneExclusion].Items;

# 5904|       auto& Zones = File_Adm_Private->Items[item_zone].Items;

# 5905|       auto& TransportTrackFormats = File_Adm_Private->Items[item_transportTrackFormat].Items;


Error: COMPILER_WARNING (CWE-563): [#def74]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:5904:11: warning[-Wunused-variable]: unused variable ‘Zones’
# 5904 |     auto& Zones = File_Adm_Private->Items[item_zone].Items;
#      |           ^~~~~
# 5902|       auto& Positions = File_Adm_Private->Items[item_position].Items;

# 5903|       auto& ZoneExclusions = File_Adm_Private->Items[item_zoneExclusion].Items;

# 5904|->     auto& Zones = File_Adm_Private->Items[item_zone].Items;

# 5905|       auto& TransportTrackFormats = File_Adm_Private->Items[item_transportTrackFormat].Items;

# 5906|       auto& frameHeaders = File_Adm_Private->Items[item_frameHeader].Items;


Error: COMPILER_WARNING (CWE-563): [#def75]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:6463:12: warning[-Wunused-variable]: unused variable ‘BlockFormat_Pos’
# 6463 |     size_t BlockFormat_Pos = 0;
#      |            ^~~~~~~~~~~~~~~
# 6461|   

# 6462|       // Errors - audioChannelFormat

# 6463|->     size_t BlockFormat_Pos = 0;

# 6464|       size_t Position_Pos = 0;

# 6465|       size_t zoneExclusion_Pos = 0;


Error: COMPILER_WARNING (CWE-563): [#def76]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:6464:12: warning[-Wunused-variable]: unused variable ‘Position_Pos’
# 6464 |     size_t Position_Pos = 0;
#      |            ^~~~~~~~~~~~
# 6462|       // Errors - audioChannelFormat

# 6463|       size_t BlockFormat_Pos = 0;

# 6464|->     size_t Position_Pos = 0;

# 6465|       size_t zoneExclusion_Pos = 0;

# 6466|       size_t zone_Pos = 0;


Error: COMPILER_WARNING (CWE-563): [#def77]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:6465:12: warning[-Wunused-variable]: unused variable ‘zoneExclusion_Pos’
# 6465 |     size_t zoneExclusion_Pos = 0;
#      |            ^~~~~~~~~~~~~~~~~
# 6463|       size_t BlockFormat_Pos = 0;

# 6464|       size_t Position_Pos = 0;

# 6465|->     size_t zoneExclusion_Pos = 0;

# 6466|       size_t zone_Pos = 0;

# 6467|       for (size_t i = 0; i < ChannelFormats.size(); i++) {


Error: COMPILER_WARNING (CWE-563): [#def78]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:6466:12: warning[-Wunused-variable]: unused variable ‘zone_Pos’
# 6466 |     size_t zone_Pos = 0;
#      |            ^~~~~~~~
# 6464|       size_t Position_Pos = 0;

# 6465|       size_t zoneExclusion_Pos = 0;

# 6466|->     size_t zone_Pos = 0;

# 6467|       for (size_t i = 0; i < ChannelFormats.size(); i++) {

# 6468|           auto& ChannelFormat = ChannelFormats[i];


Error: COMPILER_WARNING (CWE-563): [#def79]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:6469:21: warning[-Wunused-variable]: unused variable ‘ID’
# 6469 |         const auto& ID = ChannelFormat.Attributes[audioChannelFormat_audioChannelFormatID];
#      |                     ^~
# 6467|       for (size_t i = 0; i < ChannelFormats.size(); i++) {

# 6468|           auto& ChannelFormat = ChannelFormats[i];

# 6469|->         const auto& ID = ChannelFormat.Attributes[audioChannelFormat_audioChannelFormatID];

# 6470|           const auto Type = GetType(File_Adm_Private, item_audioChannelFormat, i);

# 6471|   


Error: COMPILER_WARNING (CWE-195): [#def80]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:6545:39: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 6545 |             if (End - Element.c_str() < Element.size()) {
#      |                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
# 6543|               char* End;

# 6544|               auto Value = strtof(Element.c_str(), &End);

# 6545|->             if (End - Element.c_str() < Element.size()) {

# 6546|                   TrackUID.AddError(Error, ":audioTrackUID" + to_string(i) + ":sampleRate:sampleRate attribute value \"" + Element + "\" is malformed");

# 6547|               }


Error: COMPILER_WARNING (CWE-195): [#def81]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_Adm.cpp:6557:39: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
# 6557 |             if (End - Element.c_str() < Element.size()) {
#      |                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
# 6555|               char* End;

# 6556|               auto Value = strtof(Element.c_str(), &End);

# 6557|->             if (End - Element.c_str() < Element.size()) {

# 6558|                   TrackUID.AddError(Error, ":audioTrackUID" + to_string(i) + ":bitDepth:bitDepth attribute value \"" + Element + "\" is malformed");

# 6559|               }


Error: CLANG_WARNING: [#def82]
libmediainfo-24.04-build/MediaInfoLib/Source/MediaInfo/Audio/File_DolbyE.cpp:3592:21: warning[deadcode.DeadStores]: Value stored to 'Channels' is never read
# 3590|                   if (meta[ac3_lfeon])

# 3591|                   {

# 3592|->                     Channels += 1;

# 3593|                       ChannelPositions += __T(", LFE");

# 3594|                       ChannelPositions2 += __T(".1");


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.01-1.fc40
diffbase-store-results-to/tmp/tmpoh583ro7/libmediainfo-24.01-1.fc40.tar.xz
diffbase-time-created2024-07-03 15:49:40
diffbase-time-finished2024-07-03 15:56:46
diffbase-toolcsmock
diffbase-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'
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.04-1.fc41
store-results-to/tmp/tmp931vxqip/libmediainfo-24.04-1.fc41.tar.xz
time-created2024-07-03 15:57:13
time-finished2024-07-03 16:03:55
titleNewly introduced defects
toolcsmock
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'
tool-versioncsmock-3.5.3-1.el9