2025-05-10 03:37 ftp://ftp.de.debian.org/debian/pool/main/d/dvbtune/dvbtune_0.5.ds.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: b3c7f00 (2025-05-09 17:59:20 +0200) count: 96 95 elapsed-time: 2.1 2.1 head-timing-info: old-timing-info: head results: dvbtune-0.5/tune.c:48:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_SELFTEST [valueFlowBailoutIncompleteVar] dvbtune-0.5/tune.c:60:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_SET_POWER_STATE [valueFlowBailoutIncompleteVar] dvbtune-0.5/tune.c:72:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_GET_POWER_STATE [valueFlowBailoutIncompleteVar] dvbtune-0.5/tune.c:102:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SEC_GET_STATUS [valueFlowBailoutIncompleteVar] dvbtune-0.5/tune.c:156:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_HAS_SIGNAL [valueFlowBailoutIncompleteVar] dvbtune-0.5/tune.c:303:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_SET_FRONTEND [valueFlowBailoutIncompleteVar] dvbtune-0.5/tune.c:427:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_GET_INFO [valueFlowBailoutIncompleteVar] dvbtune-0.5/xml2vdr.c:345:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dvbtune-0.5/tune.c:590:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] dvbtune-0.5/tune.c:48:10: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] dvbtune-0.5/tune.c:60:10: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] dvbtune-0.5/tune.c:72:10: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] dvbtune-0.5/tune.c:102:10: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] dvbtune-0.5/tune.c:427:8: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] dvbtune-0.5/tune.c:79:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:82:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:85:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:88:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:91:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:354:12: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:465:7: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:471:7: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:571:7: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:571:7: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/tune.c:349:14: error: Uninitialized variable: fe_info [uninitvar] dvbtune-0.5/tune.c:48:15: style: Variable 'ans' is assigned a value that is never used. [unreadVariable] dvbtune-0.5/tune.c:60:15: style: Variable 'ans' is assigned a value that is never used. [unreadVariable] dvbtune-0.5/dvbtune.c:271:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DMX_STOP [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:294:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DMX_STOP [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:317:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DMX_STOP [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:339:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DMX_STOP [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:361:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DMX_STOP [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:383:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DMX_STOP [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:402:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DMX_IN_FRONTEND [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:704:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:782:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:869:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:934:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:1014:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_READ_BER [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:1026:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_READ_SIGNAL_STRENGTH [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:1037:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_READ_SNR [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:1062:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FE_READ_UNCORRECTED_BLOCKS [valueFlowBailoutIncompleteVar] dvbtune-0.5/dvbtune.c:1085:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable QAM_64 [valueFlowBailoutIncompleteVar] dvbtune-0.5/xml2vdr.c:0:0: debug: ValueFlow maximum iterations exceeded [valueFlowMaxIterations] dvbtune-0.5/xml2vdr.c:247:20: style: Condition 'x' is always false [knownConditionTrueFalse] dvbtune-0.5/xml2vdr.c:245:16: note: Assignment 'x=0', assigned value is 0 dvbtune-0.5/xml2vdr.c:247:20: note: Condition 'x' is always false dvbtune-0.5/xml2vdr.c:65:52: style: Parameter 'source' can be declared as pointer to const [constParameterPointer] dvbtune-0.5/xml2vdr.c:282:49: style: Parameter 'state' can be declared as pointer to const. However it seems that 'xmlsat_Characters' is a callback function, if 'state' is declared with const you might also need to cast function pointer(s). [constParameterCallback] dvbtune-0.5/xml2vdr.c:320:23: note: You might need to cast the function pointer here dvbtune-0.5/xml2vdr.c:282:49: note: Parameter 'state' can be declared as pointer to const dvbtune-0.5/xml2vdr.c:248:17: style: Variable 'x' is assigned a value that is never used. [unreadVariable] dvbtune-0.5/dvbtune.c:1014:14: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] dvbtune-0.5/dvbtune.c:1026:14: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] dvbtune-0.5/dvbtune.c:1037:14: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] dvbtune-0.5/dvbtune.c:1062:14: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] dvbtune-0.5/dvbtune.c:1342:7: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/dvbtune.c:1344:7: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/dvbtune.c:1357:7: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/dvbtune.c:1357:7: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/dvbtune.c:1360:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/dvbtune.c:1360:9: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/dvbtune.c:1363:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] dvbtune-0.5/dvbtune.c:164:5: warning: If memory allocation fails, then there is a possible null pointer dereference: transponders [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:162:40: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:162:18: note: Assignment 'transponders=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:164:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:165:5: warning: If memory allocation fails, then there is a possible null pointer dereference: transponders [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:162:40: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:162:18: note: Assignment 'transponders=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:165:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:166:5: warning: If memory allocation fails, then there is a possible null pointer dereference: transponders [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:162:40: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:162:18: note: Assignment 'transponders=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:166:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:167:5: warning: If memory allocation fails, then there is a possible null pointer dereference: transponders [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:162:40: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:162:18: note: Assignment 'transponders=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:167:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:168:5: warning: If memory allocation fails, then there is a possible null pointer dereference: transponders [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:162:40: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:162:18: note: Assignment 'transponders=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:168:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:169:5: warning: If memory allocation fails, then there is a possible null pointer dereference: transponders [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:162:40: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:162:18: note: Assignment 'transponders=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:169:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:170:5: warning: If memory allocation fails, then there is a possible null pointer dereference: transponders [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:162:40: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:162:18: note: Assignment 'transponders=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:170:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:171:5: warning: If memory allocation fails, then there is a possible null pointer dereference: transponders [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:162:40: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:162:18: note: Assignment 'transponders=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:171:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:188:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:186:31: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:186:9: note: Assignment 't=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:188:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:189:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:186:31: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:186:9: note: Assignment 't=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:189:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:190:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:186:31: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:186:9: note: Assignment 't=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:190:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:191:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:186:31: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:186:9: note: Assignment 't=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:191:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:192:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:186:31: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:186:9: note: Assignment 't=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:192:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:193:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:186:31: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:186:9: note: Assignment 't=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:193:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:194:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:186:31: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:186:9: note: Assignment 't=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:194:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:195:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:186:31: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:186:9: note: Assignment 't=(struct transponder_t*)malloc(sizeof(transponder))', assigned value is 0 dvbtune-0.5/dvbtune.c:195:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:238:5: warning: If memory allocation fails, then there is a possible null pointer dereference: pats [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:236:24: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:236:10: note: Assignment 'pats=(struct pat_t*)malloc(sizeof(pat))', assigned value is 0 dvbtune-0.5/dvbtune.c:238:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:239:5: warning: If memory allocation fails, then there is a possible null pointer dereference: pats [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:236:24: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:236:10: note: Assignment 'pats=(struct pat_t*)malloc(sizeof(pat))', assigned value is 0 dvbtune-0.5/dvbtune.c:239:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:240:5: warning: If memory allocation fails, then there is a possible null pointer dereference: pats [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:236:24: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:236:10: note: Assignment 'pats=(struct pat_t*)malloc(sizeof(pat))', assigned value is 0 dvbtune-0.5/dvbtune.c:240:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:241:5: warning: If memory allocation fails, then there is a possible null pointer dereference: pats [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:236:24: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:236:10: note: Assignment 'pats=(struct pat_t*)malloc(sizeof(pat))', assigned value is 0 dvbtune-0.5/dvbtune.c:241:5: note: Null pointer dereference dvbtune-0.5/dvbtune.c:256:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:254:23: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:254:9: note: Assignment 't=(struct pat_t*)malloc(sizeof(pat))', assigned value is 0 dvbtune-0.5/dvbtune.c:256:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:257:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:254:23: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:254:9: note: Assignment 't=(struct pat_t*)malloc(sizeof(pat))', assigned value is 0 dvbtune-0.5/dvbtune.c:257:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:258:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:254:23: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:254:9: note: Assignment 't=(struct pat_t*)malloc(sizeof(pat))', assigned value is 0 dvbtune-0.5/dvbtune.c:258:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:259:7: warning: If memory allocation fails, then there is a possible null pointer dereference: t [nullPointerOutOfMemory] dvbtune-0.5/dvbtune.c:254:23: note: Assuming allocation function fails dvbtune-0.5/dvbtune.c:254:9: note: Assignment 't=(struct pat_t*)malloc(sizeof(pat))', assigned value is 0 dvbtune-0.5/dvbtune.c:259:7: note: Null pointer dereference dvbtune-0.5/dvbtune.c:421:52: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] dvbtune-0.5/dvbtune.c:685:17: style: Parameter 'fname' can be declared as pointer to const [constParameterPointer] dvbtune-0.5/dvbtune.c:685:39: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] dvbtune-0.5/dvbtune.c:906:17: error: Uninitialized variables: pat.scanned, pat.scanned, pat.next, pat.next [uninitvar] dvbtune-0.5/dvbtune.c:906:17: error: Uninitialized struct member: pat.scanned [uninitStructMember] dvbtune-0.5/dvbtune.c:906:17: error: Uninitialized struct member: pat.next [uninitStructMember] dvbtune-0.5/dvbtune.c:203:11: style: Variable 't' is assigned a value that is never used. [unreadVariable] dvbtune-0.5/dvbtune.c:736:17: style: Variable 'network_id' is assigned a value that is never used. [unreadVariable] dvbtune-0.5/dvbtune.c:1014:19: style: Variable 'ans' is assigned a value that is never used. [unreadVariable] dvbtune-0.5/dvbtune.c:1026:19: style: Variable 'ans' is assigned a value that is never used. [unreadVariable] dvbtune-0.5/dvbtune.c:1037:19: style: Variable 'ans' is assigned a value that is never used. [unreadVariable] dvbtune-0.5/dvbtune.c:1062:19: style: Variable 'ans' is assigned a value that is never used. [unreadVariable] dvbtune-0.5/dvbtune.c:1267:14: style: Variable 'fd_dvr' is assigned a value that is never used. [unreadVariable] diff: head dvbtune-0.5/tune.c:349:14: error: Uninitialized variable: fe_info [uninitvar] DONE