2025-10-16 16:23 ftp://ftp.de.debian.org/debian/pool/main/f/fdupes/fdupes_2.4.0.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=sqlite3 --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 -j4 platform: Linux-6.12.48+deb13-amd64-x86_64-with-glibc2.41 python: 3.13.5 client-version: 1.3.67 compiler: g++ (Debian 14.2.0-19) 14.2.0 cppcheck: head 2.18.0 head-info: 7828eb5 (2025-10-15 23:40:19 +0200) count: 105 102 elapsed-time: 0.9 0.9 head-timing-info: old-timing-info: head results: fdupes-2.4.0/errormsg.c:32:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdupes-2.4.0/confirmmatch.c:33:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CHUNK_SIZE [valueFlowBailoutIncompleteVar] fdupes-2.4.0/dir.c:50:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] fdupes-2.4.0/errormsg.c:34:1: error: va_list 'ap' was opened but not closed by va_end(). [va_end_missing] fdupes-2.4.0/dir.c:29:9: style: Variable 'cwd' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/fmatch.c:37:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] fdupes-2.4.0/fmatch.c:24:31: style: Parameter 'matchstring' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/log.c:163:19: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] fdupes-2.4.0/log.c:30:33: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/log.c:183:20: style: Variable 'f' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/hashdb.c:252:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SQLITE_TRANSIENT [valueFlowBailoutIncompleteVar] fdupes-2.4.0/hashdb.c:408:66: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SQLITE_TRANSIENT [valueFlowBailoutIncompleteVar] fdupes-2.4.0/hashdb.c:549:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SQLITE_TRANSIENT [valueFlowBailoutIncompleteVar] fdupes-2.4.0/hashdb.c:648:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SQLITE_TRANSIENT [valueFlowBailoutIncompleteVar] fdupes-2.4.0/hashdb.c:720:70: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SQLITE_TRANSIENT [valueFlowBailoutIncompleteVar] fdupes-2.4.0/hashdb.c:740:69: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SQLITE_TRANSIENT [valueFlowBailoutIncompleteVar] fdupes-2.4.0/hashdb.c:404:72: style:inconclusive: Function 'hashdb_getdirectoryid' argument 3 names different: declaration 'directoryid' definition 'directory_id'. [funcArgNamesDifferent] fdupes-2.4.0/hashdb.h:34:73: note: Function 'hashdb_getdirectoryid' argument 3 names different: declaration 'directoryid' definition 'directory_id'. fdupes-2.4.0/hashdb.c:404:72: note: Function 'hashdb_getdirectoryid' argument 3 names different: declaration 'directoryid' definition 'directory_id'. fdupes-2.4.0/hashdb.c:493:63: style:inconclusive: Function 'hashdb_foreachdirectory' argument 2 names different: declaration 'parentid' definition 'parent'. [funcArgNamesDifferent] fdupes-2.4.0/hashdb.h:38:63: note: Function 'hashdb_foreachdirectory' argument 2 names different: declaration 'parentid' definition 'parent'. fdupes-2.4.0/hashdb.c:493:63: note: Function 'hashdb_foreachdirectory' argument 2 names different: declaration 'parentid' definition 'parent'. fdupes-2.4.0/hashdb.c:613:67: style: Parameter 'partialhash' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/hashdb.c:613:92: style: Parameter 'fullhash' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/hashdb.c:680:52: style: Parameter 'directoryid' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/hashdb.c:733:17: style: Unused variable: pathid [unusedVariable] fdupes-2.4.0/fdupes.c:175:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CLOCK_MONOTONIC [valueFlowBailoutIncompleteVar] fdupes-2.4.0/fdupes.c:345:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FDUPES_PROGRESS_REFRESH_MS [valueFlowBailoutIncompleteVar] fdupes-2.4.0/fdupes.c:466:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CHUNK_SIZE [valueFlowBailoutIncompleteVar] fdupes-2.4.0/fdupes.c:517:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PARTIAL_MD5_SIZE [valueFlowBailoutIncompleteVar] fdupes-2.4.0/fdupes.c:993:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INPUT_SIZE [valueFlowBailoutIncompleteVar] fdupes-2.4.0/fdupes.c:1345:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdupes-2.4.0/fdupes.c:1562:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_CTYPE [valueFlowBailoutIncompleteVar] fdupes-2.4.0/mbstowcs_escape_invalid.c:77:20: style: Condition 'result==-2' is always false [knownConditionTrueFalse] fdupes-2.4.0/mbstowcs_escape_invalid.c:83:25: style: Condition 'result==-1' is always false [knownConditionTrueFalse] fdupes-2.4.0/getrealpath.c:151:13: error: Memory leak: dirname [memleak] fdupes-2.4.0/getrealpath.c:94:12: style: Unused variable: moveto [unusedVariable] fdupes-2.4.0/ncurses-commands.c:243:89: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PCRE2_UCP [valueFlowBailoutIncompleteVar] fdupes-2.4.0/ncurses-commands.c:512:89: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PCRE2_UCP [valueFlowBailoutIncompleteVar] fdupes-2.4.0/ncurses-commands.c:960:66: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLS [valueFlowBailoutIncompleteVar] fdupes-2.4.0/ncurses-getcommand.c:107:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERR [valueFlowBailoutIncompleteVar] fdupes-2.4.0/ncurses-getcommand.c:116:26: style: Variable 'docommandinput' is assigned a value that is never used. [unreadVariable] fdupes-2.4.0/ncurses-interface.c:255:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLS [valueFlowBailoutIncompleteVar] fdupes-2.4.0/ncurses-interface.c:297:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLS [valueFlowBailoutIncompleteVar] fdupes-2.4.0/ncurses-interface.c:411:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] fdupes-2.4.0/ncurses-prompt.c:139:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable A_BOLD [valueFlowBailoutIncompleteVar] fdupes-2.4.0/ncurses-prompt.c:102:76: style: Parameter 'commandbuffer' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/ncurses-prompt.c:77:15: error: va_list 'ap' was opened but not closed by va_end(). [va_end_missing] fdupes-2.4.0/ncurses-prompt.c:77:15: error: va_list 'aq' was opened but not closed by va_end(). [va_end_missing] fdupes-2.4.0/ncurses-status.c:142:5: warning: If memory allocation fails, then there is a possible null pointer dereference: text [nullPointerOutOfMemory] fdupes-2.4.0/ncurses-status.c:138:26: note: Assuming allocation function fails fdupes-2.4.0/ncurses-status.c:138:10: note: Assignment 'text=(wchar_t*)malloc((cols+1)*sizeof(wchar_t))', assigned value is 0 fdupes-2.4.0/ncurses-status.c:142:5: note: Null pointer dereference fdupes-2.4.0/ncurses-status.c:144:5: warning: If memory allocation fails, then there is a possible null pointer dereference: text [nullPointerOutOfMemory] fdupes-2.4.0/ncurses-status.c:138:26: note: Assuming allocation function fails fdupes-2.4.0/ncurses-status.c:138:10: note: Assignment 'text=(wchar_t*)malloc((cols+1)*sizeof(wchar_t))', assigned value is 0 fdupes-2.4.0/ncurses-status.c:144:5: note: Null pointer dereference fdupes-2.4.0/ncurses-status.c:148:5: warning: If memory allocation fails, then there is a possible null pointer dereference: text [nullPointerOutOfMemory] fdupes-2.4.0/ncurses-status.c:138:26: note: Assuming allocation function fails fdupes-2.4.0/ncurses-status.c:138:10: note: Assignment 'text=(wchar_t*)malloc((cols+1)*sizeof(wchar_t))', assigned value is 0 fdupes-2.4.0/ncurses-status.c:148:5: note: Null pointer dereference fdupes-2.4.0/ncurses-status.c:150:3: warning: If memory allocation fails, then there is a possible null pointer dereference: text [nullPointerOutOfMemory] fdupes-2.4.0/ncurses-status.c:138:26: note: Assuming allocation function fails fdupes-2.4.0/ncurses-status.c:138:10: note: Assignment 'text=(wchar_t*)malloc((cols+1)*sizeof(wchar_t))', assigned value is 0 fdupes-2.4.0/ncurses-status.c:150:3: note: Null pointer dereference fdupes-2.4.0/ncurses-status.c:152:45: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: text [nullPointerOutOfMemory] fdupes-2.4.0/ncurses-status.c:138:26: note: Assuming allocation function fails fdupes-2.4.0/ncurses-status.c:138:10: note: Assignment 'text=(wchar_t*)malloc((cols+1)*sizeof(wchar_t))', assigned value is 0 fdupes-2.4.0/ncurses-status.c:152:45: note: Null pointer dereference fdupes-2.4.0/removeifnotchanged.c:59:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] fdupes-2.4.0/wcs.c:24:25: style: Parameter 's1' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/wcs.c:24:35: style: Parameter 's2' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/wcs.c:46:21: style: Parameter 'haystack' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/wcs.c:46:40: style: Parameter 'needle' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/wcs.c:71:24: style: Parameter 'haystack' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/wcs.c:71:43: style: Parameter 'needle' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/wcs.c:96:23: style: Parameter 'haystack' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/ncurses-commands.c:229:10: style: Unused variable: size [unusedVariable] fdupes-2.4.0/ncurses-commands.c:496:10: style: Unused variable: size [unusedVariable] fdupes-2.4.0/ncurses-commands.c:858:21: style: Variable 'preservecount' is assigned a value that is never used. [unreadVariable] fdupes-2.4.0/xdgbase.c:40:18: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] fdupes-2.4.0/xdgbase.c:16:11: style: Variable 'cachedir' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/xdgbase.c:21:20: style: Variable 'pw' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/ncurses-interface.c:674:29: style: Condition 'cursorgroup==groupindex' is always true [knownConditionTrueFalse] fdupes-2.4.0/ncurses-interface.c:644:25: note: Assuming that condition 'cursorgroup!=groupindex' is not redundant fdupes-2.4.0/ncurses-interface.c:674:29: note: Condition 'cursorgroup==groupindex' is always true fdupes-2.4.0/ncurses-interface.c:1141:24: style: Variable 'commandbuffer[0]' is reassigned a value before the old one has been used. [redundantAssignment] fdupes-2.4.0/ncurses-interface.c:949:38: note: commandbuffer[0] is assigned fdupes-2.4.0/ncurses-interface.c:1141:24: note: commandbuffer[0] is overwritten fdupes-2.4.0/ncurses-interface.c:1141:24: style: Variable 'commandbuffer[0]' is reassigned a value before the old one has been used. [redundantAssignment] fdupes-2.4.0/ncurses-interface.c:1121:28: note: commandbuffer[0] is assigned fdupes-2.4.0/ncurses-interface.c:1141:24: note: commandbuffer[0] is overwritten fdupes-2.4.0/ncurses-interface.c:58:47: style: Parameter 'group' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/ncurses-interface.c:73:26: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/ncurses-interface.c:127:37: style: Parameter 'groups' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/ncurses-interface.c:312:42: style: Parameter 'currentgroup' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/ncurses-interface.c:312:65: style: Parameter 'commandbuffer_in' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/ncurses-interface.c:315:12: style: Variable 'token' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/ncurses-interface.c:395:12: style: Variable 'token' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/ncurses-interface.c:78:10: style: Unused variable: read [unusedVariable] fdupes-2.4.0/ncurses-interface.c:79:10: style: Unused variable: filename_bytes [unusedVariable] fdupes-2.4.0/ncurses-interface.c:80:11: style: Unused variable: ch [unusedVariable] fdupes-2.4.0/ncurses-interface.c:380:7: style: Unused variable: unresolvedcount [unusedVariable] fdupes-2.4.0/fdupes.c:143:48: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] fdupes-2.4.0/fdupes.c:1103:10: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] fdupes-2.4.0/fdupes.c:1113:12: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] fdupes-2.4.0/fdupes.c:483:5: error: Memory leak: digest [memleak] fdupes-2.4.0/fdupes.c:626:5: error: Memory leak: filename_a [memleak] fdupes-2.4.0/fdupes.c:962:20: style: Local variable 'loginfo' shadows outer variable [shadowVariable] fdupes-2.4.0/fdupes.c:74:18: note: Shadowed declaration fdupes-2.4.0/fdupes.c:962:20: note: Shadow variable fdupes-2.4.0/fdupes.c:92:27: style: Parameter 'escape_list' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/fdupes.c:205:19: style: Parameter 'arg' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/fdupes.c:238:46: style: Parameter 'info' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/fdupes.c:299:18: style: Variable 'dirinfo' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/fdupes.c:306:15: style: Variable 'indicator' can be declared as const array [constVariable] fdupes-2.4.0/fdupes.c:309:20: style: Variable 'name' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/fdupes.c:579:48: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/fdupes.c:581:11: style: Variable 'dupe' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/fdupes.c:604:26: style: Parameter 'file_a' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/fdupes.c:604:42: style: Parameter 'file_b' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/fdupes.c:824:11: style: Variable 'tmpfile' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/fdupes.c:955:9: style: Variable 'token' can be declared as pointer to const [constVariablePointer] fdupes-2.4.0/fdupes.c:1236:35: style: Parameter 'f1' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/fdupes.c:1236:47: style: Parameter 'f2' can be declared as pointer to const [constParameterPointer] fdupes-2.4.0/fdupes.c:1244:33: style: Parameter 'f1' can be declared as pointer to const. However it seems that 'sort_pairs_by_ctime' is a callback function, if 'f1' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fdupes-2.4.0/fdupes.c:1899:40: note: You might need to cast the function pointer here fdupes-2.4.0/fdupes.c:1244:33: note: Parameter 'f1' can be declared as pointer to const fdupes-2.4.0/fdupes.c:1244:45: style: Parameter 'f2' can be declared as pointer to const. However it seems that 'sort_pairs_by_ctime' is a callback function, if 'f2' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fdupes-2.4.0/fdupes.c:1899:40: note: You might need to cast the function pointer here fdupes-2.4.0/fdupes.c:1244:45: note: Parameter 'f2' can be declared as pointer to const fdupes-2.4.0/fdupes.c:1272:36: style: Parameter 'f1' can be declared as pointer to const. However it seems that 'sort_pairs_by_filename' is a callback function, if 'f1' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fdupes-2.4.0/fdupes.c:1900:40: note: You might need to cast the function pointer here fdupes-2.4.0/fdupes.c:1272:36: note: Parameter 'f1' can be declared as pointer to const fdupes-2.4.0/fdupes.c:1272:48: style: Parameter 'f2' can be declared as pointer to const. However it seems that 'sort_pairs_by_filename' is a callback function, if 'f2' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fdupes-2.4.0/fdupes.c:1900:40: note: You might need to cast the function pointer here fdupes-2.4.0/fdupes.c:1272:48: note: Parameter 'f2' can be declared as pointer to const fdupes-2.4.0/fdupes.c:257:15: style: Unused variable: path [unusedVariable] fdupes-2.4.0/fdupes.c:701:9: style: Unused variable: fullpath [unusedVariable] fdupes-2.4.0/fdupes.c:1228:13: style: Variable 'loginfo' is assigned a value that is never used. [unreadVariable] diff: head fdupes-2.4.0/fdupes.c:581:11: style: Variable 'dupe' can be declared as pointer to const [constVariablePointer] head fdupes-2.4.0/fdupes.c:824:11: style: Variable 'tmpfile' can be declared as pointer to const [constVariablePointer] head fdupes-2.4.0/log.c:183:20: style: Variable 'f' can be declared as pointer to const [constVariablePointer] DONE