2024-04-12 20:40 ftp://ftp.de.debian.org/debian/pool/main/s/sffview/sffview_0.5.0.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=wxwidgets --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-102-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.55 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.13.0 head-info: 646f869 (2024-04-12 10:43:30 +0200) count: 47 40 elapsed-time: 1.1 0.8 head-timing-info: old-timing-info: head results: sffview-0.5.0/common.cpp:108:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable err_count [valueFlowBailoutIncompleteVar] sffview-0.5.0/common.cpp:160:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] sffview-0.5.0/common.cpp:159:9: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] sffview-0.5.0/common.h:105:16: style: Virtual function 'Open' is called from constructor 'CFile(const std::string&strPath)' at line 119. Dynamic binding is not used. [virtualCallInConstructor] sffview-0.5.0/common.cpp:119:3: note: Calling Open sffview-0.5.0/common.h:105:16: note: Open is a virtual function sffview-0.5.0/common.h:107:16: style: Virtual function 'Close' is called from destructor '~CFile()' at line 124. Dynamic binding is not used. [virtualCallInConstructor] sffview-0.5.0/common.cpp:124:3: note: Calling Close sffview-0.5.0/common.h:107:16: note: Close is a virtual function sffview-0.5.0/common.h:67:3: style: Class 'CSimpleException' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] sffview-0.5.0/common.h:92:3: style: Class 'CFile' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] sffview-0.5.0/common.cpp:174:25: style: Parameter 'pSource' can be declared as pointer to const [constParameterPointer] sffview-0.5.0/common.cpp:171:13: style: Variable 'rc' is assigned a value that is never used. [unreadVariable] sffview-0.5.0/decoder.h:102:3: warning: Member variable 'CHuffDecoder::m_dwRunlength' is not initialized in the constructor. [uninitMemberVar] sffview-0.5.0/decoder.h:47:12: style:inconclusive: Technically the member function 'CBitSource::GetBits' can be const. [functionConst] sffview-0.5.0/decoder.cpp:73:22: note: Technically the member function 'CBitSource::GetBits' can be const. sffview-0.5.0/decoder.h:47:12: note: Technically the member function 'CBitSource::GetBits' can be const. sffview-0.5.0/decoder.h:48:8: style:inconclusive: Technically the member function 'CBitSource::NoMoreBits' can be const. [functionConst] sffview-0.5.0/decoder.cpp:78:18: note: Technically the member function 'CBitSource::NoMoreBits' can be const. sffview-0.5.0/decoder.h:48:8: note: Technically the member function 'CBitSource::NoMoreBits' can be const. sffview-0.5.0/decoder.h:76:16: style: The function 'SetBits' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] sffview-0.5.0/decoder.h:58:16: note: Virtual function in base class sffview-0.5.0/decoder.h:76:16: note: Function in derived class sffview-0.5.0/decoder.h:77:16: style: The function 'ClearBits' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] sffview-0.5.0/decoder.h:59:16: note: Virtual function in base class sffview-0.5.0/decoder.h:77:16: note: Function in derived class sffview-0.5.0/decoder.h:91:8: style: The function 'SetBits' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] sffview-0.5.0/decoder.h:76:16: note: Virtual function in base class sffview-0.5.0/decoder.h:91:8: note: Function in derived class sffview-0.5.0/decoder.cpp:84:12: style: C-style pointer casting [cstyleCast] sffview-0.5.0/decoder.cpp:142:11: style: C-style pointer casting [cstyleCast] sffview-0.5.0/decoder.cpp:171:12: style: The scope of the variable 'bits' can be reduced. [variableScope] sffview-0.5.0/decoder.cpp:80:26: style: Checking if unsigned expression 'm_dwByteCount' is less than zero. [unsignedLessThanZero] sffview-0.5.0/sffapp.cpp:37:0: error: #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h! [preprocessorErrorDirective] sffview-0.5.0/sffdoc.cpp:37:0: error: #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h! [preprocessorErrorDirective] sffview-0.5.0/sfffile.cpp:323:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] sffview-0.5.0/sfffile.cpp:0:0: debug: ValueFlow maximum iterations exceeded [valueFlowMaxIterations] sffview-0.5.0/sfffile.h:103:13: style:inconclusive: Technically the member function 'CSffFile::GetPageCount' can be const. [functionConst] sffview-0.5.0/sfffile.h:118:13: performance:inconclusive: Technically the member function 'CSffFile::DecodeRecord' can be static (but you may consider moving to unnamed namespace). [functionStatic] sffview-0.5.0/sfffile.cpp:308:16: note: Technically the member function 'CSffFile::DecodeRecord' can be static (but you may consider moving to unnamed namespace). sffview-0.5.0/sfffile.h:118:13: note: Technically the member function 'CSffFile::DecodeRecord' can be static (but you may consider moving to unnamed namespace). sffview-0.5.0/sfffile.h:100:3: style: Class 'CSffFile' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] sffview-0.5.0/sfffile.h:101:4: style: The destructor '~CSffFile' overrides a destructor in a base class but is not marked with a 'override' specifier. [missingOverride] sffview-0.5.0/common.h:95:12: note: Virtual destructor in base class sffview-0.5.0/sfffile.h:101:4: note: Destructor in derived class sffview-0.5.0/sfffile.cpp:321:3: style: Exception should be caught by reference. [catchExceptionByValue] sffview-0.5.0/sfffile.cpp:271:17: style: C-style pointer casting [cstyleCast] sffview-0.5.0/sfffile.cpp:278:17: style: C-style pointer casting [cstyleCast] sffview-0.5.0/sfffile.cpp:300:19: style: C-style pointer casting [cstyleCast] sffview-0.5.0/sfffile.cpp:253:16: style: The scope of the variable 'b2' can be reduced. [variableScope] sffview-0.5.0/sfffile.cpp:254:12: style: The scope of the variable 'w' can be reduced. [variableScope] sffview-0.5.0/sfffile.cpp:72:33: performance: Prefer prefix ++/-- operators for non-primitive types. [postfixOperator] sffview-0.5.0/sffview.cpp:80:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] sffview-0.5.0/sffview.cpp:96:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable wxNullBitmap [valueFlowBailoutIncompleteVar] sffview-0.5.0/sffview.cpp:179:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] sffview-0.5.0/sffview.h:84:2: warning: Member variable 'SffView::m_pMemDC' is not initialized in the constructor. [uninitMemberVar] sffview-0.5.0/sffview.h:84:2: warning: Member variable 'SffView::m_nBitmapWidth' is not initialized in the constructor. [uninitMemberVar] sffview-0.5.0/sffview.h:84:2: warning: Member variable 'SffView::m_nBitmapHeight' is not initialized in the constructor. [uninitMemberVar] sffview-0.5.0/sffview.h:84:2: warning: Member variable 'SffView::m_nZoom' is not initialized in the constructor. [uninitMemberVar] sffview-0.5.0/sffview.h:84:2: warning: Member variable 'SffView::m_bXFlipped' is not initialized in the constructor. [uninitMemberVar] sffview-0.5.0/sffview.h:84:2: warning: Member variable 'SffView::m_bYFlipped' is not initialized in the constructor. [uninitMemberVar] sffview-0.5.0/sffview.h:84:2: warning: Member variable 'SffView::m_nScaleType' is not initialized in the constructor. [uninitMemberVar] sffview-0.5.0/sffdoc.h:105:3: style: Class 'SffPrintout' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] sffview-0.5.0/sffview.cpp:158:14: style: C-style pointer casting [cstyleCast] sffview-0.5.0/sffview.cpp:196:25: style: C-style pointer casting [cstyleCast] diff: head sffview-0.5.0/common.cpp:160:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] head sffview-0.5.0/sfffile.cpp:0:0: debug: ValueFlow maximum iterations exceeded [valueFlowMaxIterations] 2.13.0 sffview-0.5.0/sfffile.cpp:150:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable height [valueFlowBailoutIncompleteVar] head sffview-0.5.0/sfffile.cpp:253:16: style: The scope of the variable 'b2' can be reduced. [variableScope] head sffview-0.5.0/sfffile.cpp:254:12: style: The scope of the variable 'w' can be reduced. [variableScope] head sffview-0.5.0/sfffile.cpp:323:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] head sffview-0.5.0/sfffile.h:101:4: style: The destructor '~CSffFile' overrides a destructor in a base class but is not marked with a 'override' specifier. [missingOverride] sffview-0.5.0/common.h:95:12: note: Virtual destructor in base class sffview-0.5.0/sfffile.h:101:4: note: Destructor in derived class head sffview-0.5.0/sffview.cpp:179:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] 2.13.0 sffview-0.5.0/sffview.cpp:72:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable canvas [valueFlowBailoutIncompleteVar] head sffview-0.5.0/sffview.cpp:80:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] head sffview-0.5.0/sffview.cpp:96:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable wxNullBitmap [valueFlowBailoutIncompleteVar] DONE