Error: COMPILER_WARNING (CWE-195): [#def1] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Audio/File_Dat.cpp: scope_hint: In lambda function libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Audio/File_Dat.cpp:205:44: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ # 205 | if (Max_Value < Values[i] && i != Max_Pos) { # | ~~^~~~~~~~~~ # 203| Max_Value >>= 2; # 204| for (size_t i = 0; i < 4; i++) { # 205|-> if (Max_Value < Values[i] && i != Max_Pos) { # 206| return -1; # 207| } Error: COMPILER_WARNING (CWE-563): [#def2] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mpeg4_Elements.cpp:2208:38: warning[-Wunused-variable]: unused variable ‘Duration’ # 2208 | auto Duration=(float)Stream.second.stts_Duration/Stream.second.mdhd_TimeScale; # | ^~~~~~~~ # 2206| auto FrameRateRatio=(float)Stream.second.stts_Duration/Stream.second.stts_FrameCount; # 2207| auto FrameRate=Stream.second.mdhd_TimeScale/FrameRateRatio; # 2208|-> auto Duration=(float)Stream.second.stts_Duration/Stream.second.mdhd_TimeScale; # 2209| if (FrameRate) # 2210| { Error: COMPILER_WARNING (CWE-1023): [#def3] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mpeg4_Elements.cpp: scope_hint: In member function ‘void MediaInfoLib::File_Mpeg4::mdat_xxxx()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mpeg4_Elements.cpp:2212:44: warning[-Wswitch]: enumeration value ‘config_probe_none’ not handled in switch # 2212 | switch (Probe.Start_Type) { # | ^ # 2210| { # 2211| auto Probe=Config->File_ProbeCaption_Get(ParserName); # 2212|-> switch (Probe.Start_Type) { # 2213| case config_probe_dur: # 2214| ProbeCaption_mdatPos=Probe.Start*FrameRate; Error: COMPILER_WARNING (CWE-1023): [#def4] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mpeg4_Elements.cpp:2225:44: warning[-Wswitch]: enumeration value ‘config_probe_none’ not handled in switch # 2225 | switch (Probe.Duration_Type) { # | ^ # 2223| break; # 2224| } # 2225|-> switch (Probe.Duration_Type) { # 2226| case config_probe_dur: # 2227| ProbeCaption_mdatDur=Probe.Duration*FrameRate; Error: COMPILER_WARNING (CWE-563): [#def5] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp: scope_hint: In member function ‘void MediaInfoLib::File_Mxf::Streams_Finish_Descriptor(ZenLib::int128u, ZenLib::int128u)’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp:3267:12: warning[-Wunused-but-set-variable]: variable ‘Before_Count’ set but not used # 3267 | size_t Before_Count[Stream_Max]; # | ^~~~~~~~~~~~ # 3265| # 3266| //Locators # 3267|-> size_t Before_Count[Stream_Max]; # 3268| for (size_t Pos=0; Pos<Stream_Max; Pos++) # 3269| Before_Count[Pos]=(size_t)-1; Error: COMPILER_WARNING (CWE-563): [#def6] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp: scope_hint: In member function ‘virtual void MediaInfoLib::File_Mxf::Header_Parse()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp:5719:12: warning[-Wunused-variable]: unused variable ‘Code_Compare3’ # 5719 | int32u Code_Compare3=Code.lo>>32; # | ^~~~~~~~~~~~~ # 5717| # 5718| //Filling # 5719|-> int32u Code_Compare3=Code.lo>>32; # 5720| bool IsFiller=(Code.hi>>24)==0x060E2B3401 # 5721| && (Code.lo==Elements::FillerData || Code.lo==Elements::TerminatingFillerData); Error: COMPILER_WARNING (CWE-569): [#def7] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp: scope_hint: In member function ‘virtual void MediaInfoLib::File_Mxf::Data_Parse()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp:6187:59: warning[-Wparentheses]: suggest parentheses around ‘&&’ within ‘||’ # 6187 | if (Essence->second.Parsers.size()==1 && Descriptor->second.Infos["Format_Settings_Wrapping"].rfind(__T("Frame"), 0)==0 || Essence->second.Infos["Format_Settings_Wrapping"].rfind(__T("Frame"), 0)==0) //TODO: Parsers.size()==1 is for avoiding Dolby E issues, it should be fixed instead # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 6185| if (Essence->second.Parsers.empty()) # 6186| ChooseParser__FromEssence(Essence, Descriptor); //Searching by the track identifier # 6187|-> if (Essence->second.Parsers.size()==1 && Descriptor->second.Infos["Format_Settings_Wrapping"].rfind(__T("Frame"), 0)==0 || Essence->second.Infos["Format_Settings_Wrapping"].rfind(__T("Frame"), 0)==0) //TODO: Parsers.size()==1 is for avoiding Dolby E issues, it should be fixed instead # 6188| Essence->second.Parsers[0]->FrameIsAlwaysComplete=true; # 6189| Error: COMPILER_WARNING (CWE-563): [#def8] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp: scope_hint: In member function ‘void MediaInfoLib::File_Mxf::AES3PCMDescriptor()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp:6829:37: warning[-Wunused-variable]: unused variable ‘Temp’ # 6829 | const char* Temp; \ # | ^~~~ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp:6896:5: note: in expansion of macro ‘ELEMENT’ # 6896 | ELEMENT(3D08, AES3PCMDescriptor_AuxBitsMode) # | ^~~~~~~ # 6827| case 0x##_CODE : { \ # 6828| std::map<int16u, int128u>::iterator Primer_Value=Primer_Values.find(0x##_CODE); \ # 6829|-> const char* Temp; \ # 6830| if (Primer_Value!=Primer_Values.end()) { \ # 6831| auto Temp = Mxf_Param_Info((int32u)Primer_Value->second.hi, Primer_Value->second.lo); \ Error: COMPILER_WARNING (CWE-563): [#def9] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp: scope_hint: In member function ‘void MediaInfoLib::File_Mxf::FileDescriptor_EssenceContainer()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp:9406:15: warning[-Wunused-variable]: unused variable ‘Code8’ # 9406 | int8u Code8=(int8u)((EssenceContainer.lo&0x00000000000000FFLL) ); # | ^~~~~ # 9404| int8u Code6=(int8u)((EssenceContainer.lo&0x0000000000FF0000LL)>>16); # 9405| int8u Code7=(int8u)((EssenceContainer.lo&0x000000000000FF00LL)>> 8); # 9406|-> int8u Code8=(int8u)((EssenceContainer.lo&0x00000000000000FFLL) ); # 9407| # 9408| Descriptors[InstanceUID].EssenceContainer=EssenceContainer; Error: COMPILER_WARNING (CWE-1023): [#def10] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp: scope_hint: In member function ‘virtual bool MediaInfoLib::File_Mxf::BookMark_Needed()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp:15679:16: warning[-Wswitch]: enumeration value ‘config_probe_none’ not handled in switch #15679 | switch (Probe.Duration_Type) { # | ^ #15677| default:; #15678| } #15679|-> switch (Probe.Duration_Type) { #15680| case config_probe_size: #15681| ProbeCaptionByteDur=Probe.Duration; Error: COMPILER_WARNING (CWE-563): [#def11] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Mxf.cpp:15696:14: warning[-Wunused-variable]: unused variable ‘CurrentEnd’ #15696 | auto CurrentEnd=File_Offset+Buffer_Offset; # | ^~~~~~~~~~ #15694| } #15695| auto MaxOffset=ProbeCaptionBytePos+ProbeCaptionByteDur; #15696|-> auto CurrentEnd=File_Offset+Buffer_Offset; #15697| if (ProbeCaptionBytePos!=(int64u)-1 && ProbeCaptionByteDur!=(int64u)-1 && File_Size/2>ProbeCaptionByteDur) #15698| { Error: COMPILER_WARNING (CWE-195): [#def12] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Vbi.cpp: scope_hint: In member function ‘void MediaInfoLib::File_Vbi::Line21()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Vbi.cpp:198:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} # 198 | for (int i = 0; i < Buffer_Size; i++) { # | ~~^~~~~~~~~~~~~ # 196| int8u Level_Min = (int8u)-1; # 197| int8u Level_Max = 0; # 198|-> for (int i = 0; i < Buffer_Size; i++) { # 199| auto Value = Buffer[i]; # 200| Level_Min = min(Level_Min, Value); Error: COMPILER_WARNING (CWE-195): [#def13] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Vbi.cpp:217:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} # 217 | for (int i = 0; i < Buffer_Size; i++) { # | ~~^~~~~~~~~~~~~ # 215| int8u Current_Value = (int8u)-1; # 216| bool Is1 = false; # 217|-> for (int i = 0; i < Buffer_Size; i++) { # 218| auto Value = Buffer[i]; # 219| if (Value <= Level_0) { Error: COMPILER_WARNING (CWE-195): [#def14] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Vbi.cpp:302:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 302 | for (int Idx = Idx_Min; Idx < Idx_Max; Idx++) { # | ~~~~^~~~~~~~~ # 300| ClockRunIn_0_x2 += Step_x12 / 12; // From start of a bit to middle of a bit # 301| auto Idx_Max = Get_Buffer_Index(8); // Middle of S2 # 302|-> for (int Idx = Idx_Min; Idx < Idx_Max; Idx++) { # 303| if (Buffer[Idx] > Level_0) { # 304| return; // Issue between begin of S1 and middle of S2, not 0 Error: COMPILER_WARNING (CWE-195): [#def15] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Vbi.cpp: scope_hint: In member function ‘void MediaInfoLib::File_Vbi::Vitc()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Vbi.cpp:351:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} # 351 | for (int i = 0; i < Buffer_Size; i++) { # | ~~^~~~~~~~~~~~~ # 349| int8u Level_Min = (int8u)-1; # 350| int8u Level_Max = 0; # 351|-> for (int i = 0; i < Buffer_Size; i++) { # 352| auto Value = Buffer[i]; # 353| Level_Min = min(Level_Min, Value); Error: COMPILER_WARNING (CWE-195): [#def16] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Vbi.cpp:369:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} # 369 | for (int i = 0; i < Buffer_Size; i++) { # | ~~^~~~~~~~~~~~~ # 367| size_t Current_Pos_PreviousChange = 0; // Min index of the 0 level or the 1 level # 368| bool Is1 = false; # 369|-> for (int i = 0; i < Buffer_Size; i++) { # 370| auto Value = Buffer[i]; # 371| if (Value <= Level_0) { Error: COMPILER_WARNING (CWE-195): [#def17] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Vbi.cpp: scope_hint: In member function ‘void MediaInfoLib::File_Vbi::Teletext()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Multiple/File_Vbi.cpp:473:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} # 473 | for (int i = 0; i < Buffer_Size; i++) { # | ~~^~~~~~~~~~~~~ # 471| int8u Level_Min = (int8u)-1; # 472| int8u Level_Max = 0; # 473|-> for (int i = 0; i < Buffer_Size; i++) { # 474| auto Value = Buffer[i]; # 475| Level_Min = min(Level_Min, Value); Error: COMPILER_WARNING (CWE-195): [#def18] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Text/File_Pac.cpp: scope_hint: In function ‘void MediaInfoLib::Pac_Convert(ZenLib::Ztring&, const codepage&)’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Text/File_Pac.cpp:51:34: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘wchar_t’ and ‘long unsigned int’ # 51 | if (Item >= 0x20 && Item < Table_Size && Table[Item]) { # | ~~~~~^~~~~~~~~~~~ # 49| auto Table_Size = CodePage.Size + 0x20; # 50| for (auto& Item : ToConvert) { # 51|-> if (Item >= 0x20 && Item < Table_Size && Table[Item]) { # 52| Item = Table[Item]; # 53| } Error: COMPILER_WARNING (CWE-195): [#def19] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Text/File_Pac.cpp: scope_hint: In member function ‘virtual void MediaInfoLib::File_Pac::Data_Parse()’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Text/File_Pac.cpp:455:32: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘std::vector<ZenLib::Ztring>::size_type’ {aka ‘long unsigned int’} and ‘int’ # 455 | if (Content.size() == 1 + FirstFrameOfVideo) { # | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ # 453| } # 454| bool FirstFrameOfVideo = !Frame_Count && Content.size() == 2 && Content[0] == __T("First Frame of Video"); # 455|-> if (Content.size() == 1 + FirstFrameOfVideo) { # 456| const auto& Line = Content[FirstFrameOfVideo]; # 457| if (Line.rfind(__T("FRAME "), 0) == 0 && Line.find_first_not_of(__T("0123456789"), 6) == string::npos) { Error: COMPILER_WARNING (CWE-195): [#def20] libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Video/File_Ffv1.cpp: scope_hint: In member function ‘ZenLib::int32s MediaInfoLib::File_Ffv1::pixel_GR(ZenLib::int32s)’ libmediainfo-24.11-build/MediaInfoLib/Source/MediaInfo/Video/File_Ffv1.cpp:1681:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘ZenLib::int32s’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1681 | if (context >= Context_GR_Size) # | ~~~~~~~~^~~~~~~~~~~~~~~~~~ # 1679| if (context) # 1680| { # 1681|-> if (context >= Context_GR_Size) # 1682| { # 1683| BS->Skip(BS->Remain());
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.82.0 |
diffbase-analyzer-version-cppcheck | 2.16.0 |
diffbase-analyzer-version-gcc | 14.2.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.0 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-231.us-west-2.compute.internal |
diffbase-mock-config | fedora-rawhide-gcc-latest-x86_64 |
diffbase-project-name | libmediainfo-24.04-2.fc41 |
diffbase-store-results-to | /tmp/tmpz489y6gn/libmediainfo-24.04-2.fc41.tar.xz |
diffbase-time-created | 2024-11-13 01:31:58 |
diffbase-time-finished | 2024-11-13 01:37:30 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpz489y6gn/libmediainfo-24.04-2.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpz489y6gn/libmediainfo-24.04-2.fc41.src.rpm' |
diffbase-tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-231.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libmediainfo-24.11-1.fc42 |
store-results-to | /tmp/tmpm_h818ty/libmediainfo-24.11-1.fc42.tar.xz |
time-created | 2024-11-13 01:37:47 |
time-finished | 2024-11-13 01:43:06 |
title | Newly introduced findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpm_h818ty/libmediainfo-24.11-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpm_h818ty/libmediainfo-24.11-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |