2025-10-16 16:23 ftp://ftp.de.debian.org/debian/pool/main/f/fdutils/fdutils_5.6.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 -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: 110 110 elapsed-time: 0.4 0.4 head-timing-info: old-timing-info: head results: fdutils-5.6/doc/texi-linearize.c:17:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/doc/texi-linearize.c:34:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/convert.c:81:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] fdutils-5.6/src/convert.c:77:3: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] fdutils-5.6/src/convert.c:78:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] fdutils-5.6/src/convert.c:24:31: style: Parameter 'fmt' can be declared as pointer to const. However it seems that 'print_token' is a callback function, if 'fmt' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fdutils-5.6/src/convert.c:49:34: note: You might need to cast the function pointer here fdutils-5.6/src/convert.c:24:31: note: Parameter 'fmt' can be declared as pointer to const fdutils-5.6/src/convert.c:41:33: style: Parameter 'name' can be declared as pointer to const. However it seems that '_print_params' is a callback function, if 'name' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fdutils-5.6/src/convert.c:81:28: note: You might need to cast the function pointer here fdutils-5.6/src/convert.c:41:33: note: Parameter 'name' can be declared as pointer to const fdutils-5.6/src/convert.c:41:45: style: Parameter 'comment' can be declared as pointer to const. However it seems that '_print_params' is a callback function, if 'comment' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fdutils-5.6/src/convert.c:81:28: note: You might need to cast the function pointer here fdutils-5.6/src/convert.c:41:45: note: Parameter 'comment' can be declared as pointer to const fdutils-5.6/src/convert.c:52:25: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/convert.c:77:7: style: Variable 'argc' is assigned a value that is never used. [unreadVariable] fdutils-5.6/src/convert.c:78:7: style: Variable 'argv' is assigned a value that is never used. [unreadVariable] fdutils-5.6/src/diskd.c:35:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FD_SILENT_DCL_CLEAR [valueFlowBailoutIncompleteVar] fdutils-5.6/src/diskd.c:80:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] fdutils-5.6/doc/texi-linearize.c:6:21: style: Parameter 'directory' can be declared as pointer to const [constParameterPointer] fdutils-5.6/doc/texi-linearize.c:6:38: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/diskseekd.c:81:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] fdutils-5.6/src/calc-format.c:115:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/calc-format.c:244:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/calc-format.c:357:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/calc-format.c:484:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/driveprm.c:107:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/driveprm.c:144:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FLOPPY_MAJOR [valueFlowBailoutIncompleteVar] fdutils-5.6/src/driveprm.c:167:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FDGETDRVPRM [valueFlowBailoutIncompleteVar] fdutils-5.6/src/diskd.c:17:52: style: Parameter 'emsg' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/diskd.c:32:33: style: Parameter 'dpr' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/diskseekd.c:102:13: warning: If resource allocation fails, then there is a possible null pointer dereference: pidfile [nullPointerOutOfResources] fdutils-5.6/src/diskseekd.c:101:20: note: Assuming allocation function fails fdutils-5.6/src/diskseekd.c:101:20: note: Assignment 'pidfile=fopen(pidfilename,"w")', assigned value is 0 fdutils-5.6/src/diskseekd.c:102:13: note: Null pointer dereference fdutils-5.6/src/diskseekd.c:103:12: warning: If resource allocation fails, then there is a possible null pointer dereference: pidfile [nullPointerOutOfResources] fdutils-5.6/src/diskseekd.c:101:20: note: Assuming allocation function fails fdutils-5.6/src/diskseekd.c:101:20: note: Assignment 'pidfile=fopen(pidfilename,"w")', assigned value is 0 fdutils-5.6/src/diskseekd.c:103:12: note: Null pointer dereference fdutils-5.6/src/diskseekd.c:22:52: style: Parameter 'emsg' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/diskseekd.c:52:8: style: Variable 'tmp_s' can be declared as pointer to const [constVariablePointer] fdutils-5.6/src/enh_options.c:18:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/enh_options.c:74:64: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable option [valueFlowBailoutIncompleteVar] fdutils-5.6/src/enh_options.c:165:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/enh_options.c:442:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/enh_options.c:488:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] fdutils-5.6/src/calc-format.c:370:3: style: Statements following noreturn function 'abort()' will never be executed. [unreachableCode] fdutils-5.6/src/calc-format.c:496:6: style: Local variable 'sectors' shadows outer variable [shadowVariable] fdutils-5.6/src/superformat.h:40:12: note: Shadowed declaration fdutils-5.6/src/calc-format.c:496:6: note: Shadow variable fdutils-5.6/src/calc-format.c:13:58: style: Parameter 'fd' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/calc-format.c:19:47: style: Parameter 'fd' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/calc-format.c:120:39: style: Parameter 'fd' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/fdrawcmd.c:107:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FD_RAW_READ [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdrawcmd.c:156:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/floppycontrol.c:273:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:116:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:130:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_INFO [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:143:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LOG_ERR [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:185:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:300:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mntent [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:362:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:392:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:444:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable s_magic [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:578:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:647:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MS_RDONLY [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:845:58: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:928:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:978:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdmount.c:1091:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MS_NOEXEC [valueFlowBailoutIncompleteVar] fdutils-5.6/src/enh_options.c:14:24: style: Parameter 'progname' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/enh_options.c:14:54: style: Parameter 'eo' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/enh_options.c:14:64: style: Parameter 'userparams' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/enh_options.c:256:47: style: Parameter 'eo' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/enh_options.c:383:15: style: Variable 'ptr2' can be declared as pointer to const [constVariablePointer] fdutils-5.6/src/enh_options.c:435:44: style: Parameter 'eo' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/enh_options.c:435:54: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/floppymeter.c:290:48: error: There is an unknown macro here somewhere. Configuration is required. If SYSCONFDIR is a macro then please configure it. [unknownMacro] fdutils-5.6/src/floppycontrol.c:24:52: style: Parameter 'emsg' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/getfdprm.c:19:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/getfdprm.c:65:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] fdutils-5.6/src/getfdprm.c:17:18: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/getfdprm.c:23:28: style: Parameter 'fmt' can be declared as pointer to const. However it seems that 'myprintf' is a callback function, if 'fmt' is declared with const you might also need to cast function pointer(s). [constParameterCallback] fdutils-5.6/src/getfdprm.c:90:30: note: You might need to cast the function pointer here fdutils-5.6/src/getfdprm.c:23:28: note: Parameter 'fmt' can be declared as pointer to const fdutils-5.6/src/getfdprm.c:32:8: style: Variable 'name' can be declared as pointer to const [constVariablePointer] fdutils-5.6/src/measure.c:51:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FD_READ [valueFlowBailoutIncompleteVar] fdutils-5.6/src/measure.c:123:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FD_FORMAT [valueFlowBailoutIncompleteVar] fdutils-5.6/src/measure.c:167:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FD_READID [valueFlowBailoutIncompleteVar] fdutils-5.6/src/measure.c:203:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/mediaprm.c:223:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/mediaprm.c:280:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SYSCONFDIR [valueFlowBailoutIncompleteVar] fdutils-5.6/src/fdrawcmd.c:401:8: warning: Invalid close() argument nr 1. The value is -1 but the valid values are '0:'. [invalidFunctionArg] fdutils-5.6/src/fdrawcmd.c:193:8: note: Assignment 'fd=-1', assigned value is -1 fdutils-5.6/src/fdrawcmd.c:194:8: note: Assuming condition is false fdutils-5.6/src/fdrawcmd.c:401:8: note: Invalid argument fdutils-5.6/src/measure.c:76:7: style: Local variable 'i' shadows outer variable [shadowVariable] fdutils-5.6/src/measure.c:48:6: note: Shadowed declaration fdutils-5.6/src/measure.c:76:7: note: Shadow variable fdutils-5.6/src/measure.c:192:12: style: Variable 'cap' is assigned a value that is never used. [unreadVariable] fdutils-5.6/src/fdrawcmd.c:71:18: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/fdrawcmd.c:73:23: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] fdutils-5.6/src/fdrawcmd.c:102:42: style: Parameter 'raw_cmd' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/fdrawcmd.c:142:8: style: Variable 'drive' can be declared as pointer to const [constVariablePointer] fdutils-5.6/src/misc.c:13:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/misc.c:27:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/parse.c:11:20: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/oldfdprm.c:76:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/printfdprm.c:150:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FD_2M [valueFlowBailoutIncompleteVar] fdutils-5.6/src/setfdprm.c:46:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FDSETPRM [valueFlowBailoutIncompleteVar] fdutils-5.6/src/setfdprm.c:35:6: style: Local variable 'cmd' shadows outer variable [shadowVariable] fdutils-5.6/src/setfdprm.c:19:5: note: Shadowed declaration fdutils-5.6/src/setfdprm.c:35:6: note: Shadow variable fdutils-5.6/src/skews.c:82:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/oldfdprm.c:73:7: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] fdutils-5.6/src/oldfdprm.c:48:22: style:inconclusive: Function 'scan_fdprm' argument 1 names different: declaration 'f' definition 'file'. [funcArgNamesDifferent] fdutils-5.6/src/oldfdprm.h:1:22: note: Function 'scan_fdprm' argument 1 names different: declaration 'f' definition 'file'. fdutils-5.6/src/oldfdprm.c:48:22: note: Function 'scan_fdprm' argument 1 names different: declaration 'f' definition 'file'. fdutils-5.6/src/oldfdprm.c:19:36: style: Parameter 'arg' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/oldfdprm.c:48:34: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/skews.c:9:50: style: Parameter 'f' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/skews.c:66:7: style: Variable 'rots' is assigned a value that is never used. [unreadVariable] fdutils-5.6/src/skews.c:78:9: style: Variable 'rots' is assigned a value that is never used. [unreadVariable] fdutils-5.6/src/xdfcopy.c:780:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] fdutils-5.6/src/superformat.c:612:86: error: There is an unknown macro here somewhere. Configuration is required. If SYSCONFDIR is a macro then please configure it. [unknownMacro] fdutils-5.6/src/fdmount.c:946:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] fdutils-5.6/src/fdmount.c:393:16: error: Resource leak: fd [resourceLeak] fdutils-5.6/src/fdmount.c:855:11: style: Variable 'fuid' is reassigned a value before the old one has been used. [redundantAssignment] fdutils-5.6/src/fdmount.c:854:8: note: fuid is assigned fdutils-5.6/src/fdmount.c:855:11: note: fuid is overwritten fdutils-5.6/src/fdmount.c:337:20: style: Variable 'ent' can be declared as pointer to const [constVariablePointer] fdutils-5.6/src/fdmount.c:628:34: style: Parameter '_mountpoint' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/fdmount.c:825:24: style: Variable 'uidstr' can be declared as pointer to const [constVariablePointer] fdutils-5.6/src/fdmount.c:888:15: style: Variable 'mnt' can be declared as pointer to const [constVariablePointer] fdutils-5.6/src/fdmount.c:1003:21: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/fdmount.c:1028:40: style: Parameter 'new' can be declared as pointer to const [constParameterPointer] fdutils-5.6/src/fdmount.c:1086:26: style: Variable 'longopt' can be declared as const array [constVariable] diff: DONE