2022-06-29 18:30 ftp://ftp.de.debian.org/debian/pool/main/m/mdbtools/mdbtools_1.0.0+dfsg.orig.tar.xz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --inline-suppr --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j1 platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.25 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 cppcheck: head 2.8 head-info: 06b408e (2022-06-29 13:43:17 +0200) count: 64 64 elapsed-time: 2.1 1.8 head-timing-info: Tokenizer::simplifyTokens1: 1.32812s (avg. 0.0255409s - 52 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 1.09375s (avg. 0.0210337s - 52 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.078125s (avg. 0.0015024s - 52 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.078125s (avg. 0.0015024s - 52 result(s)) Tokenizer::createTokens: 0.046875s (avg. 0.000901442s - 52 result(s)) Overall time: 2.78125s old-timing-info: Tokenizer::simplifyTokens1: 1.35938s (avg. 0.0261418s - 52 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 1.07812s (avg. 0.0207332s - 52 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.140625s (avg. 0.00270433s - 52 result(s)) Other::runChecks: 0.078125s (avg. 0.0015024s - 52 result(s)) Tokenizer::simplifyTokens1::createAst: 0.03125s (avg. 0.000600962s - 52 result(s)) Overall time: 2.85938s head results: mdbtools-1.0.0/src/libmdb/data.c:521:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/libmdb/data.c:530:5: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/libmdb/data.c:218:32: style: Parameter 'null_mask' can be declared as pointer to const [constParameter] mdbtools-1.0.0/src/libmdb/data.c:337:36: style: Variable 'lookupflag' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/libmdb/fakeglib.c:339:20: style: Condition '!found' is always true [knownConditionTrueFalse] mdbtools-1.0.0/src/libmdb/fakeglib.c:337:13: note: Assuming that condition 'found' is not redundant mdbtools-1.0.0/src/libmdb/fakeglib.c:339:20: note: Condition '!found' is always true mdbtools-1.0.0/src/libmdb/fakeglib.c:404:20: style: Condition '!found' is always true [knownConditionTrueFalse] mdbtools-1.0.0/src/libmdb/fakeglib.c:402:13: note: Assuming that condition 'found' is not redundant mdbtools-1.0.0/src/libmdb/fakeglib.c:404:20: note: Condition '!found' is always true mdbtools-1.0.0/src/libmdb/fakeglib.c:502:56: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] mdbtools-1.0.0/src/libmdb/fakeglib.c:437:41: style: Parameter 'data' can be declared as pointer to const [constParameter] mdbtools-1.0.0/src/libmdb/file.c:215:14: style: Condition 'file==NULL' is always true [knownConditionTrueFalse] mdbtools-1.0.0/src/libmdb/file.c:209:18: note: Assignment 'file=NULL', assigned value is 0 mdbtools-1.0.0/src/libmdb/file.c:215:14: note: Condition 'file==NULL' is always true mdbtools-1.0.0/src/libmdb/file.c:377:19: portability: 'pg_buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] mdbtools-1.0.0/src/libmdb/iconv.c:196:61: error: Uninitialized variable: &count [uninitvar] mdbtools-1.0.0/src/libmdb/iconv.c:330:18: style: Variable 'iconv_code' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/libmdb/iconv.c:331:13: style: Variable 'iconv_code' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/libmdb/index.c:723:11: style: Condition '!passed' is always true [knownConditionTrueFalse] mdbtools-1.0.0/src/libmdb/index.c:683:17: note: Assignment 'passed=0', assigned value is 0 mdbtools-1.0.0/src/libmdb/index.c:692:20: note: Assuming condition is false mdbtools-1.0.0/src/libmdb/index.c:723:11: note: Condition '!passed' is always true mdbtools-1.0.0/src/libmdb/index.c:317:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/libmdb/index.c:431:33: style: Parameter 'src' can be declared as pointer to const [constParameter] mdbtools-1.0.0/src/libmdb/index.c:611:10: style: Variable 'len' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/libmdb/index.c:820:16: style: Variable 'idx_start' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/libmdb/index.c:1097:11: style: Variable 'cost' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/libmdb/money.c:102:74: style: Parameter 'multiplier' can be declared as pointer to const [constParameter] mdbtools-1.0.0/src/libmdb/money.c:104:16: style: Variable 'number' can be declared as const array [constVariable] mdbtools-1.0.0/src/libmdb/money.c:132:45: style: Parameter 'array' can be declared as pointer to const [constParameter] mdbtools-1.0.0/src/libmdb/props.c:107:13: style: Variable 'record_len' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/libmdb/rc4.c:31:72: style: Parameter 'key_data_ptr' can be declared as pointer to const [constParameter] mdbtools-1.0.0/src/libmdb/table.c:371:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/libmdb/table.c:173:25: portability: 'buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] mdbtools-1.0.0/src/libmdb/write.c:258:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/libmdb/write.c:259:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/libmdb/write.c:260:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/libmdb/write.c:297:4: warning: %i in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/libmdb/write.c:272:59: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] mdbtools-1.0.0/src/odbc/connectparams.c:131:11: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] mdbtools-1.0.0/src/odbc/connectparams.c:129:11: note: outer condition: p mdbtools-1.0.0/src/odbc/connectparams.c:131:11: note: identical inner condition: p mdbtools-1.0.0/src/odbc/connectparams.c:136:11: style: Condition 'p' is always true [knownConditionTrueFalse] mdbtools-1.0.0/src/odbc/odbc.c:1483:14: style: Local variable 'partsRemain' shadows outer variable [shadowVariable] mdbtools-1.0.0/src/odbc/odbc.c:1432:14: note: Shadowed declaration mdbtools-1.0.0/src/odbc/odbc.c:1483:14: note: Shadow variable mdbtools-1.0.0/src/odbc/odbc.c:2018:67: warning: Uninitialized variable: tmp [uninitvar] mdbtools-1.0.0/src/odbc/odbc.c:1994:12: note: Assuming condition is false mdbtools-1.0.0/src/odbc/odbc.c:2018:67: note: Uninitialized variable: tmp mdbtools-1.0.0/src/odbc/odbc.c:1244:29: style: Variable '((SQLCHAR*)rgbValue)[1]' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/odbc/odbc.c:1249:30: style: Variable '((SQLWCHAR*)rgbValue)[1]' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/odbc/odbc.c:1488:54: style: Variable '((SQLWCHAR*)rgbValue)[charactersToReadThisPart]' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/odbc/odbc.c:1491:53: style: Variable '((SQLCHAR*)rgbValue)[charactersToReadThisPart]' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/odbc/odbcw.c:90:5: style: Variable 'l' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/sql/mdbsql.c:738:10: portability: Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'. [prohibitedgmtimeCalled] mdbtools-1.0.0/src/sql/mdbsql.c:756:11: style: Variable 'found' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/util/mdb-export.c:206:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/util/mdb-import.c:132:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/util/mdb-import.c:143:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/util/mdb-json.c:192:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mdbtools-1.0.0/src/util/base64.h:13:15: style: Variable 'n' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/util/mdb-json.c:95:12: style: Variable 'bin_len' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/util/mdb-sql.c:98:11: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/mdb-sql.c:104:12: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/mdb-sql.c:119:12: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/mdb-sql.c:133:12: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/mdb-sql.c:233:10: style: Variable 'sqlcol' is reassigned a value before the old one has been used. [redundantAssignment] mdbtools-1.0.0/src/util/mdb-sql.c:229:11: note: sqlcol is assigned mdbtools-1.0.0/src/util/mdb-sql.c:233:10: note: sqlcol is overwritten mdbtools-1.0.0/src/util/mdb-sql.c:233:10: style: Variable 'sqlcol' is assigned a value that is never used. [unreadVariable] mdbtools-1.0.0/src/util/prfreemap.c:25:5: style: Unused variable: j [unusedVariable] mdbtools-1.0.0/src/util/prole.c:71:13: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/prole.c:72:12: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/prole.c:73:13: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/sargtest.c:85:23: warning: Uninitialized variable: bound_values [uninitvar] mdbtools-1.0.0/src/util/sargtest.c:64:12: note: Assuming condition is false mdbtools-1.0.0/src/util/sargtest.c:85:23: note: Uninitialized variable: bound_values mdbtools-1.0.0/src/util/updrow.c:53:13: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/updrow.c:54:12: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/updrow.c:78:13: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/updrow.c:87:12: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] mdbtools-1.0.0/src/util/updrow.c:88:13: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] diff: head mdbtools-1.0.0/src/libmdb/data.c:218:32: style: Parameter 'null_mask' can be declared as pointer to const [constParameter] 2.8 mdbtools-1.0.0/src/libmdb/data.c:218:32: style: Parameter 'null_mask' can be declared with const [constParameter] head mdbtools-1.0.0/src/libmdb/fakeglib.c:437:41: style: Parameter 'data' can be declared as pointer to const [constParameter] 2.8 mdbtools-1.0.0/src/libmdb/fakeglib.c:437:41: style: Parameter 'data' can be declared with const [constParameter] head mdbtools-1.0.0/src/libmdb/index.c:431:33: style: Parameter 'src' can be declared as pointer to const [constParameter] 2.8 mdbtools-1.0.0/src/libmdb/index.c:431:33: style: Parameter 'src' can be declared with const [constParameter] head mdbtools-1.0.0/src/libmdb/money.c:102:74: style: Parameter 'multiplier' can be declared as pointer to const [constParameter] 2.8 mdbtools-1.0.0/src/libmdb/money.c:102:74: style: Parameter 'multiplier' can be declared with const [constParameter] head mdbtools-1.0.0/src/libmdb/money.c:104:16: style: Variable 'number' can be declared as const array [constVariable] 2.8 mdbtools-1.0.0/src/libmdb/money.c:104:16: style: Variable 'number' can be declared with const [constVariable] head mdbtools-1.0.0/src/libmdb/money.c:132:45: style: Parameter 'array' can be declared as pointer to const [constParameter] 2.8 mdbtools-1.0.0/src/libmdb/money.c:132:45: style: Parameter 'array' can be declared with const [constParameter] head mdbtools-1.0.0/src/libmdb/rc4.c:31:72: style: Parameter 'key_data_ptr' can be declared as pointer to const [constParameter] 2.8 mdbtools-1.0.0/src/libmdb/rc4.c:31:72: style: Parameter 'key_data_ptr' can be declared with const [constParameter] 2.8 mdbtools-1.0.0/src/odbc/odbc.c:2018:67: error: Uninitialized variable: tmp [uninitvar] mdbtools-1.0.0/src/odbc/odbc.c:1994:12: note: Assuming condition is false mdbtools-1.0.0/src/odbc/odbc.c:2018:67: note: Uninitialized variable: tmp head mdbtools-1.0.0/src/odbc/odbc.c:2018:67: warning: Uninitialized variable: tmp [uninitvar] mdbtools-1.0.0/src/odbc/odbc.c:1994:12: note: Assuming condition is false mdbtools-1.0.0/src/odbc/odbc.c:2018:67: note: Uninitialized variable: tmp 2.8 mdbtools-1.0.0/src/util/sargtest.c:85:23: error: Uninitialized variable: bound_values [uninitvar] mdbtools-1.0.0/src/util/sargtest.c:64:12: note: Assuming condition is false mdbtools-1.0.0/src/util/sargtest.c:85:23: note: Uninitialized variable: bound_values head mdbtools-1.0.0/src/util/sargtest.c:85:23: warning: Uninitialized variable: bound_values [uninitvar] mdbtools-1.0.0/src/util/sargtest.c:64:12: note: Assuming condition is false mdbtools-1.0.0/src/util/sargtest.c:85:23: note: Uninitialized variable: bound_values DONE