2024-04-24 16:48 ftp://ftp.de.debian.org/debian/pool/main/f/foremost/foremost_1.5.7.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 -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.56 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.14.0 head-info: 9fab9b9 (2024-04-24 10:46:48 +0200) count: 222 222 elapsed-time: 14.9 15.4 head-timing-info: old-timing-info: head results: foremost-1.5.7/api.c:60:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/api.c:321:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/api.c:418:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/api.c:487:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/api.c:504:10: style: Redundant condition: The condition '*p' is redundant since '*p > 0x1f' is sufficient. [redundantCondition] foremost-1.5.7/api.c:124:10: style: Condition 'dl==NULL' is always false [knownConditionTrueFalse] foremost-1.5.7/api.c:60:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'void *'. [invalidPrintfArgType_sint] foremost-1.5.7/api.c:526:2: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed short'. [invalidPrintfArgType_uint] foremost-1.5.7/api.c:257:7: style: Redundant initialization for 'temp'. The initialized value is overwritten before it is read. [redundantInitialization] foremost-1.5.7/api.c:246:23: note: temp is initialized foremost-1.5.7/api.c:257:7: note: temp is overwritten foremost-1.5.7/api.c:249:26: style: Checking if unsigned expression 'jump' is less than zero. [unsignedLessThanZero] foremost-1.5.7/api.c:274:26: style: Checking if unsigned expression 'jump' is less than zero. [unsignedLessThanZero] foremost-1.5.7/api.c:290:13: style: Local variable 'FATblk' shadows outer variable [shadowVariable] foremost-1.5.7/api.c:18:8: note: Shadowed declaration foremost-1.5.7/api.c:290:13: note: Shadow variable foremost-1.5.7/api.c:58:16: style: Parameter 'fmt' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/api.c:58:27: style: Parameter 'arg' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/api.c:67:18: style: Variable 'dir' can be declared as pointer to const [constVariablePointer] foremost-1.5.7/api.c:246:18: style: Variable 'temp' can be declared as pointer to const [constVariablePointer] foremost-1.5.7/api.c:98:20: style: Variable 'punctCount' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/api.c:99:20: style: Variable 'name_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/api.c:496:11: style: Variable 'unknown' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/cli.c:7:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/cli.c:19:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/cli.c:24:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] foremost-1.5.7/cli.c:16:36: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/cli.c:16:46: style: Parameter 'msg' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/cli.c:22:38: style: Parameter 'format' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/config.c:221:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/config.c:295:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] foremost-1.5.7/config.c:199:10: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] foremost-1.5.7/config.c:210:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] foremost-1.5.7/config.c:237:11: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] foremost-1.5.7/config.c:261:6: style: Condition '!extractSearchSpecData(s,tokenarray)' is always false [knownConditionTrueFalse] foremost-1.5.7/config.c:261:28: note: Calling function 'extractSearchSpecData' returns 1 foremost-1.5.7/config.c:261:6: note: Condition '!extractSearchSpecData(s,tokenarray)' is always false foremost-1.5.7/config.c:204:3: error: Memory leak: tokenarray [memleak] foremost-1.5.7/config.c:216:4: error: Memory leak: tokenarray [memleak] foremost-1.5.7/config.c:230:3: error: Memory leak: tokenarray [memleak] foremost-1.5.7/config.c:257:4: style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak] foremost-1.5.7/config.c:27:6: warning:inconclusive: Found suspicious operator '*', result is not used. [constStatement] foremost-1.5.7/config.c:32:6: warning:inconclusive: Found suspicious operator '*', result is not used. [constStatement] foremost-1.5.7/config.c:37:6: warning:inconclusive: Found suspicious operator '*', result is not used. [constStatement] foremost-1.5.7/config.c:42:6: warning:inconclusive: Found suspicious operator '*', result is not used. [constStatement] foremost-1.5.7/config.c:47:6: warning:inconclusive: Found suspicious operator '*', result is not used. [constStatement] foremost-1.5.7/config.c:52:6: warning:inconclusive: Found suspicious operator '*', result is not used. [constStatement] foremost-1.5.7/config.c:57:6: warning:inconclusive: Found suspicious operator '*', result is not used. [constStatement] foremost-1.5.7/config.c:106:36: style: Parameter 'state' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/config.c:27:9: warning: In expression like '*A++' the result of '*' is unused. Did you intend to write '(*A)++;'? [clarifyStatement] foremost-1.5.7/config.c:32:9: warning: In expression like '*A++' the result of '*' is unused. Did you intend to write '(*A)++;'? [clarifyStatement] foremost-1.5.7/config.c:37:9: warning: In expression like '*A++' the result of '*' is unused. Did you intend to write '(*A)++;'? [clarifyStatement] foremost-1.5.7/config.c:42:9: warning: In expression like '*A++' the result of '*' is unused. Did you intend to write '(*A)++;'? [clarifyStatement] foremost-1.5.7/config.c:47:9: warning: In expression like '*A++' the result of '*' is unused. Did you intend to write '(*A)++;'? [clarifyStatement] foremost-1.5.7/config.c:52:9: warning: In expression like '*A++' the result of '*' is unused. Did you intend to write '(*A)++;'? [clarifyStatement] foremost-1.5.7/config.c:57:9: warning: In expression like '*A++' the result of '*' is unused. Did you intend to write '(*A)++;'? [clarifyStatement] foremost-1.5.7/dir.c:63:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IRUSR [valueFlowBailoutIncompleteVar] foremost-1.5.7/dir.c:149:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] foremost-1.5.7/dir.c:378:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/dir.c:273:25: error: Array 'ole_types[7][4]' accessed at index 7, which is out of bounds. [arrayIndexOutOfBounds] foremost-1.5.7/dir.c:271:18: note: Assuming that condition 'j<8' is not redundant foremost-1.5.7/dir.c:273:25: note: Array index out of bounds foremost-1.5.7/dir.c:10:6: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] foremost-1.5.7/dir.c:31:18: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] foremost-1.5.7/dir.c:378:3: warning: %lu in format string (no. 2) requires 'unsigned long' but the argument type is 'signed long'. [invalidPrintfArgType_uint] foremost-1.5.7/dir.c:31:26: warning: Either the condition '(outputDir=opendir(get_output_directory(s)))==NULL' is redundant or there is possible null pointer dereference: outputDir. [nullPointerRedundantCheck] foremost-1.5.7/dir.c:25:53: note: Assuming that condition '(outputDir=opendir(get_output_directory(s)))==NULL' is not redundant foremost-1.5.7/dir.c:31:26: note: Null pointer dereference foremost-1.5.7/dir.c:23:17: style: Variable 'entry' can be declared as pointer to const [constVariablePointer] foremost-1.5.7/dir.c:176:7: style: Variable 'riff_types' can be declared as const array [constVariable] foremost-1.5.7/dir.c:177:7: style: Variable 'zip_types' can be declared as const array [constVariable] foremost-1.5.7/dir.c:311:77: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/dir.c:173:9: style: Variable 'j' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:36:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/engine.c:593:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/engine.c:627:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/engine.c:645:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] foremost-1.5.7/engine.c:696:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] foremost-1.5.7/engine.c:650:3: error: Memory leak: i [memleak] foremost-1.5.7/engine.c:245:13: style: Checking if unsigned expression 'block' is less than zero. [unsignedLessThanZero] foremost-1.5.7/engine.c:255:14: style: Checking if unsigned expression 'block2' is less than zero. [unsignedLessThanZero] foremost-1.5.7/engine.c:417:35: style: A pointer can not be negative so it is either pointless or an error to check if it is not. [pointerPositive] foremost-1.5.7/engine.c:57:47: style: Parameter 'needle' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/engine.c:58:39: style: Parameter 'table' can be declared as const array [constParameter] foremost-1.5.7/engine.c:324:9: style: Variable 'tryBS' can be declared as const array [constVariable] foremost-1.5.7/engine.c:61:24: style: Variable 'shift' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:228:21: style: Variable 'block' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:229:22: style: Variable 'block2' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:230:19: style: Variable 'dif' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:318:25: style: Variable 'foundat' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:323:28: style: Variable 'current_buflen' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:329:12: style: Variable 'bs' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:330:13: style: Variable 'rem' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:332:19: style: Variable 'found_ind' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/engine.c:343:18: style: Variable 'current_buflen' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2013:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/extract.c:1236:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] foremost-1.5.7/extract.c:2230:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] foremost-1.5.7/extract.c:2137:13: portability: Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'. [prohibitedgmtimeCalled] foremost-1.5.7/extract.c:114:89: style: Condition 'strcmp(needle->suffix,"zip")==0' is always true [knownConditionTrueFalse] foremost-1.5.7/extract.c:112:36: note: Assuming that condition 'strcmp(needle->suffix,"zip")==0' is not redundant foremost-1.5.7/extract.c:114:89: note: Condition 'strcmp(needle->suffix,"zip")==0' is always true foremost-1.5.7/extract.c:1015:36: style: Condition 'strncmp((char*)atom,"free",4)==0' is always false [knownConditionTrueFalse] foremost-1.5.7/extract.c:1021:80: style: Condition 'strncmp((char*)atom,"mdat",4)==0' is always false [knownConditionTrueFalse] foremost-1.5.7/extract.c:1022:76: style: Condition 'strncmp((char*)atom,"wide",4)==0' is always false [knownConditionTrueFalse] foremost-1.5.7/extract.c:1674:11: style: Condition 'size>0' is always true [knownConditionTrueFalse] foremost-1.5.7/extract.c:1667:11: note: Assuming that condition 'size==0' is not redundant foremost-1.5.7/extract.c:1674:11: note: Condition 'size>0' is always true foremost-1.5.7/extract.c:1878:18: style: Condition 'foundat[2]==(unsigned char)'\xff'' is always true [knownConditionTrueFalse] foremost-1.5.7/extract.c:1872:18: note: Assuming that condition 'foundat[2]!=(unsigned char)'\xff'' is not redundant foremost-1.5.7/extract.c:1878:18: note: Condition 'foundat[2]==(unsigned char)'\xff'' is always true foremost-1.5.7/extract.h:96:2: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] foremost-1.5.7/extract.h:96:2: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] foremost-1.5.7/extract.h:106:2: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] foremost-1.5.7/extract.h:106:2: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] foremost-1.5.7/extract.c:194:19: style: Redundant initialization for 'bytes_to_search'. The initialized value is overwritten before it is read. [redundantInitialization] foremost-1.5.7/extract.c:43:32: note: bytes_to_search is initialized foremost-1.5.7/extract.c:194:19: note: bytes_to_search is overwritten foremost-1.5.7/extract.c:503:9: style: Redundant initialization for 'header'. The initialized value is overwritten before it is read. [redundantInitialization] foremost-1.5.7/extract.c:462:24: note: header is initialized foremost-1.5.7/extract.c:503:9: note: header is overwritten foremost-1.5.7/extract.c:509:10: style: Variable 'foundat' is reassigned a value before the old one has been used. [redundantAssignment] foremost-1.5.7/extract.c:506:10: note: foundat is assigned foremost-1.5.7/extract.c:509:10: note: foundat is overwritten foremost-1.5.7/extract.c:520:10: style: Variable 'foundat' is reassigned a value before the old one has been used. [redundantAssignment] foremost-1.5.7/extract.c:519:10: note: foundat is assigned foremost-1.5.7/extract.c:520:10: note: foundat is overwritten foremost-1.5.7/extract.c:2045:15: style: Variable 'file_size' is reassigned a value before the old one has been used. [redundantAssignment] foremost-1.5.7/extract.c:2009:13: note: file_size is assigned foremost-1.5.7/extract.c:2045:15: note: file_size is overwritten foremost-1.5.7/extract.c:178:8: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] foremost-1.5.7/extract.c:182:3: note: Found duplicate branches for 'if' and 'else'. foremost-1.5.7/extract.c:178:8: note: Found duplicate branches for 'if' and 'else'. foremost-1.5.7/extract.c:1599:9: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] foremost-1.5.7/extract.c:1603:4: note: Found duplicate branches for 'if' and 'else'. foremost-1.5.7/extract.c:1599:9: note: Found duplicate branches for 'if' and 'else'. foremost-1.5.7/extract.c:1014:85: style: Same expression 'strncmp((char*)atom,"free",4)==0' found multiple times in chain of '||' operators. [duplicateExpression] foremost-1.5.7/extract.c:1968:24: style: Same expression on both sides of '-' because 'foundat' and 'buf' represent the same value. [duplicateExpression] foremost-1.5.7/extract.c:1958:23: note: 'buf' is assigned value 'foundat' here. foremost-1.5.7/extract.c:1968:24: note: Same expression on both sides of '-' because 'foundat' and 'buf' represent the same value. foremost-1.5.7/extract.c:382:12: style: Checking if unsigned expression 'size' is less than zero. [unsignedLessThanZero] foremost-1.5.7/extract.c:628:64: style: Checking if unsigned expression 'htoi((unsigned char*)&h->dir_flag,1)' is less than zero. [unsignedLessThanZero] foremost-1.5.7/extract.c:634:73: style: Checking if unsigned expression 'htoi((unsigned char*)&h->num_FAT_blocks,1)' is less than zero. [unsignedLessThanZero] foremost-1.5.7/extract.c:640:79: style: Checking if unsigned expression 'htoi((unsigned char*)&h->num_extra_FAT_blocks,1)' is less than zero. [unsignedLessThanZero] foremost-1.5.7/extract.c:1053:16: style: Checking if unsigned expression 'atomsize' is less than zero. [unsignedLessThanZero] foremost-1.5.7/extract.c:1538:15: style: Checking if unsigned expression 'size' is less than zero. [unsignedLessThanZero] foremost-1.5.7/extract.c:2367:17: style: Checking if unsigned expression 'filesize' is less than zero. [unsignedLessThanZero] foremost-1.5.7/extract.c:2371:18: style: Checking if unsigned expression 'ufilesize' is less than zero. [unsignedLessThanZero] foremost-1.5.7/extract.c:36:52: style: Parameter 'type' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/extract.c:715:52: style: Parameter 'type' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/extract.c:1009:30: style: Parameter 'atom' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/extract.c:1250:50: style: Parameter 'type' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/extract.c:2112:14: style: Variable 'ret_time' can be declared as pointer to const [constVariablePointer] foremost-1.5.7/extract.h:93:43: style: Parameter 'fileHeader' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/extract.h:93:84: style: Parameter 'centralHeader' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/extract.c:40:35: style: Variable 'comment_length' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:44:26: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:89:23: style: Variable 'localFH.compression' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:295:25: style: Variable 'size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:296:20: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:398:14: style: Variable 'currentpos' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:560:19: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:585:13: style: Variable 'currentpos' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:722:19: style: Variable 'extrasize' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:723:16: style: Variable 'oldblk' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:738:16: style: Variable 'result' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:929:14: style: Variable 'extrasize' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1042:24: style: Variable 'atomsize' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1155:23: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1157:32: style: Variable 'fileObjHeaderSize' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1187:13: style: Variable 'currentpos' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1204:21: style: Variable 'fileObjHeaderSize' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1236:11: style: Variable 'foundat' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1255:23: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1330:23: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1404:28: style: Variable 'currentpos' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1406:25: style: Variable 'bytes_to_search' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1407:23: style: Variable 'width' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1408:24: style: Variable 'height' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1409:23: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1423:14: style: Variable 'currentpos' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1474:22: style: Variable 'size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1484:11: style: Variable 'j' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1583:10: style: Variable 'size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1660:20: style: Variable 'size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1736:14: style: Variable 'size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1739:23: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1831:23: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1902:13: style: Variable 'currentpos' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1959:24: style: Variable 'endptr' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:1960:26: style: Variable 'beginptr' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2101:22: style: Variable 'offset' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2104:32: style: Variable 'raw_section_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2172:13: style: Variable 'SizeOfCode' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2173:24: style: Variable 'SizeOfInitializedData' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2174:26: style: Variable 'SizeOfUninitializedData' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2175:6: style: Variable 'rva' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2176:8: style: Variable 'align' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2178:14: style: Variable 'sizeofimage' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2179:18: style: Variable 'size_of_headers' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2213:10: style: Variable 'foundat' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2230:10: style: Variable 'foundat' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2272:23: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2277:25: style: Variable 'ufilesize' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2278:11: style: Variable 'i' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2291:11: style: Variable 'filesize' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/extract.c:2430:14: style: Variable 'file_size' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/helpers.c:478:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable u_int64_t [valueFlowBailoutIncompleteVar] foremost-1.5.7/helpers.c:329:3: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] foremost-1.5.7/helpers.c:329:3: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] foremost-1.5.7/helpers.c:290:2: style:inconclusive: Statements following 'return' will never be executed. [unreachableCode] foremost-1.5.7/helpers.c:321:34: style: Parameter 's' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/helpers.c:397:28: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/helpers.c:408:38: style: Parameter 'from' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/helpers.c:421:35: style: Parameter 's' can be declared as const array [constParameter] foremost-1.5.7/helpers.c:512:30: style: Parameter 's' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/helpers.c:512:41: style: Parameter 'i' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/helpers.c:424:49: warning:inconclusive: Multiplying sizeof() with sizeof() indicates a logic error. [multiplySizeof] foremost-1.5.7/helpers.c:286:11: style: Variable 'fd' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/helpers.c:324:8: style: Variable 'j' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/helpers.c:426:14: style: Variable 'temp' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/helpers.c:521:24: style: Variable 'number_of_stars' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/main.c:36:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_IGN [valueFlowBailoutIncompleteVar] foremost-1.5.7/main.c:57:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/main.c:64:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] foremost-1.5.7/main.c:126:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] foremost-1.5.7/state.c:70:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] foremost-1.5.7/state.c:89:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] foremost-1.5.7/state.c:138:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VERSION [valueFlowBailoutIncompleteVar] foremost-1.5.7/state.c:160:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] foremost-1.5.7/state.c:178:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] foremost-1.5.7/state.c:200:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] foremost-1.5.7/state.c:232:32: warning: Possible null pointer dereference: footer [nullPointer] foremost-1.5.7/state.c:381:37: note: Calling function 'init_builtin', 5th argument 'NULL' value is 0 foremost-1.5.7/state.c:232:32: note: Null pointer dereference foremost-1.5.7/state.c:330:8: style: Variable 'index' is reassigned a value before the old one has been used. [redundantAssignment] foremost-1.5.7/state.c:321:8: note: index is assigned foremost-1.5.7/state.c:330:8: note: index is overwritten foremost-1.5.7/state.c:48:34: style: Parameter 's' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:53:31: style: Parameter 's' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:58:31: style: Parameter 's' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:63:32: style: Parameter 's' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:68:39: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:82:37: style: Parameter 's' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:87:44: style: Parameter 'fn' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:111:23: style: Parameter 's' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:203:39: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:210:46: style: Parameter 'suffix' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:210:60: style: Parameter 'header' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:210:74: style: Parameter 'footer' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:250:46: style: Parameter 'marker' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:349:38: style: Parameter 'ft' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:744:35: style: Parameter 'needle' can be declared as pointer to const [constParameterPointer] foremost-1.5.7/state.c:351:12: style: Variable 'index' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/state.c:721:9: style: Variable 'index' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/state.c:747:18: style: Variable 'j' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/state.c:747:36: style: Variable 'currentindex' is assigned a value that is never used. [unreadVariable] foremost-1.5.7/state.c:232:32: error: Null pointer dereference: footer [ctunullpointer] foremost-1.5.7/state.c:278:14: note: Calling function init_builtin, 5th argument is null foremost-1.5.7/state.c:232:32: note: Dereferencing argument footer that is null diff: DONE