cppcheck-2.3 \ --enable=warning,style,performance,portability,information \ --library=posix \ --platform=unix64 \ ... \ -U__KERNEL__ \ -U__LP64__ \ -U__VERSION__ \ -U_NETWARE \ -DBUILD_INFO="(...)" \ -UCLOCK_MONOTONIC \ -DENOTSUP=1 \ -DHAVE_ATTR_PACKED \ -DHAVE_CONFIG_H \ -DSG_IO=1 \ -DSMARTMONTOOLS_SVN_REV="r1" \ -DSMARTMONTOOLS_ATTRIBUTELOG="/file" \ -DSMARTMONTOOLS_SAVESTATES="/file" \ -DSMARTMONTOOLS_DRIVEDBDIR="/dir" \ -DSOURCE_DATE_EPOCH=1665402854 \ -Umakedev \ -Ustricmp \ --suppress=syntaxError:drivedb.h \ --suppress=asctime_rCalled:utility.cpp \ --suppress=asctime_sCalled:utility.cpp \ --suppress=ftimeCalled \ --suppress=readdirCalled \ --suppress=strtokCalled \ --suppress=unusedStructMember \ *.cpp *.h os_win32/*.cpp os_win32/*.h ataidentify.cpp:585: warning: (invalidScanfArgType_int) %n in format string (no. 3) requires 'int *' but the argument type is 'signed int'. ataidentify.cpp:588: warning: (invalidScanfArgType_int) %n in format string (no. 2) requires 'int *' but the argument type is 'signed int'. ataidentify.cpp:591: warning: (invalidScanfArgType_int) %n in format string (no. 3) requires 'int *' but the argument type is 'signed int'. ataidentify.cpp:594: warning: (invalidScanfArgType_int) %n in format string (no. 2) requires 'int *' but the argument type is 'signed int'. ataprint.cpp:1470: style: (knownConditionTrueFalse) Condition '0x09<=logaddr' is always true ataprint.cpp:1488: style: (duplicateExpression) Same expression on both sides of '-'. ataprint.cpp:595: style: (unreadVariable) Variable 'jref["bits_per_unit"]' is assigned a value that is never used. ataprint.cpp:852: style: (unreadVariable) Variable 'jref["passed"]' is assigned a value that is never used. ataprint.cpp:853: style: (unreadVariable) Variable 'jref["passed"]' is assigned a value that is never used. ataprint.cpp:954: style: (unreadVariable) Variable 'jref["passed"]' is assigned a value that is never used. ataprint.cpp:959: style: (unreadVariable) Variable 'jref["remaining_percent"]' is assigned a value that is never used. ataprint.cpp:1019: style: (unreadVariable) Variable 'jref["selective_self_test_supported"]' is assigned a value that is never used. ataprint.cpp:1037: style: (unreadVariable) Variable 'jref["attribute_autosave_enabled"]' is assigned a value that is never used. ataprint.cpp:1346: style: (unreadVariable) Variable 'jref["data_table_supported"]' is assigned a value that is never used. ataprint.cpp:2163: style: (unreadVariable) Variable 'jref["count"]' is assigned a value that is never used. ataprint.cpp:2320: style: (unreadVariable) Variable 'jref["count"]' is assigned a value that is never used. ataprint.cpp:2635: style: (unreadVariable) Variable 'jref["count"]' is assigned a value that is never used. ataprint.cpp:2681: style: (unreadVariable) Variable 'jref["error_count_outdated"]' is assigned a value that is never used. ataprint.cpp:2702: style: (unreadVariable) Variable 'jref["count"]' is assigned a value that is never used. ataprint.cpp:2768: style: (unreadVariable) Variable 'jref["error_count_outdated"]' is assigned a value that is never used. ataprint.cpp:2878: style: (unreadVariable) Variable 'jrefc["status"]["string"]' is assigned a value that is never used. ataprint.cpp:2905: style: (unreadVariable) Variable 'jreff["power_up_scan_pending"]' is assigned a value that is never used. ataprint.cpp:2913: style: (unreadVariable) Variable 'jref["power_up_scan_resume_minutes"]' is assigned a value that is never used. ataprint.cpp:3146: style: (unreadVariable) Variable 'jref["write"]["deciseconds"]' is assigned a value that is never used. ataprint.cpp:3179: style: (unreadVariable) Variable 'jref["recommended_level"]' is assigned a value that is never used. ataprint.cpp:3208: style: (unreadVariable) Variable 'jref["with_standby"]' is assigned a value that is never used. ataprint.cpp:3264: style: (unreadVariable) Variable 'jref["pw_attempts_exceeded"]' is assigned a value that is never used. knowndrives.cpp:170: style: (shadowFunction) Local variable 'match' shadows outer function nvmeprint.cpp:200: style: (unreadVariable) Variable 'jrns["eui64"]["ext_id"]' is assigned a value that is never used. nvmeprint.cpp:351: style: (unreadVariable) Variable 'jref["other"]' is assigned a value that is never used. os_freebsd.cpp:166: error: (doubleFree) Memory pointed to by 'ptr' is freed twice. os_os2.cpp:108: style: (unassignedVariable) Variable 'Id' is not assigned a value. os_solaris.cpp:361: style: (variableScope) The scope of the variable 'trunc' can be reduced. os_solaris.cpp:227: style: (variableScope) The scope of the variable 't' can be reduced. os_win32/daemon_win32.cpp:421: warning: (ignoredReturnValue) Return value of function freopen() is not used. os_win32/daemon_win32.cpp:423: warning: (ignoredReturnValue) Return value of function freopen() is not used. os_win32/daemon_win32.cpp:425: warning: (ignoredReturnValue) Return value of function freopen() is not used. os_win32.cpp:1841: style: (redundantAssignment) Variable 'out_regs_set' is reassigned a value before the old one has been used. scsicmds.cpp:94: style: (knownConditionTrueFalse) Condition 'bpos>=(bpstart+(9*3))' is always false scsinvme.cpp:243: style: (unreadVariable) Variable 'cdb[1]' is assigned a value that is never used. smartd.cpp:2208: style: (duplicateExpression) Same expression on both sides of '-'.