2025-05-04 23:24 ftp://ftp.de.debian.org/debian/pool/main/h/hdparm/hdparm_9.65+ds.orig.tar.xz 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 -j1 platform: Linux-6.8.0-59-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.17.0 head-info: 88ef81e (2025-05-02 08:42:38 +0200) count: 157 156 elapsed-time: 4.8 4.7 head-timing-info: old-timing-info: head results: hdparm-9.65/apt.c:290:2: warning: %d in format string (no. 6) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] hdparm-9.65/apt.c:290:2: warning: %d in format string (no. 7) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] hdparm-9.65/apt.c:287:54: style: Parameter 'tf' can be declared as pointer to const [constParameterPointer] hdparm-9.65/apt.c:288:12: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] hdparm-9.65/contrib/fix_standby.c:138:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/contrib/fix_standby.c:151:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] hdparm-9.65/contrib/fix_standby.c:164:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] hdparm-9.65/contrib/fix_standby.c:182:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] hdparm-9.65/contrib/fix_standby.c:199:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/contrib/fix_standby.c:215:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/contrib/fix_standby.c:256:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/contrib/make_bad_sector.c:83:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable hdio_taskfile [valueFlowBailoutIncompleteVar] hdparm-9.65/contrib/make_bad_sector.c:69:27: style: Parameter 'argv' can be declared as const array [constParameter] hdparm-9.65/dvdspeed.c:34:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CGC_DATA_WRITE [valueFlowBailoutIncompleteVar] hdparm-9.65/dvdspeed.c:22:23: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] hdparm-9.65/fallocate.c:26:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/fallocate.c:20:39: style:inconclusive: Function 'do_fallocate_syscall' argument 1 names different: declaration 'name' definition 'path'. [funcArgNamesDifferent] hdparm-9.65/hdparm.h:25:39: note: Function 'do_fallocate_syscall' argument 1 names different: declaration 'name' definition 'path'. hdparm-9.65/fallocate.c:20:39: note: Function 'do_fallocate_syscall' argument 1 names different: declaration 'name' definition 'path'. hdparm-9.65/fallocate.c:25:12: style: Variable 'bytecount' is assigned a value that is never used. [unreadVariable] hdparm-9.65/fibmap.c:91:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FIBMAP [valueFlowBailoutIncompleteVar] hdparm-9.65/fibmap.c:166:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/fibmap.c:225:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] hdparm-9.65/fibmap.c:233:3: error: Resource leak: fd [resourceLeak] hdparm-9.65/fibmap.c:56:46: style: Parameter 'st' can be declared as pointer to const [constParameterPointer] hdparm-9.65/fibmap.c:275:7: style: Variable 'err' is assigned a value that is never used. [unreadVariable] hdparm-9.65/fwdownload.c:46:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] hdparm-9.65/fwdownload.c:98:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] hdparm-9.65/fwdownload.c:111:7: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/fwdownload.c:184:2: warning: %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/fwdownload.c:184:2: warning: %u in format string (no. 4) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/fwdownload.c:184:2: warning: %u in format string (no. 5) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/fwdownload.c:89:32: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] hdparm-9.65/geom.c:33:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] hdparm-9.65/geom.c:87:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __u64 [valueFlowBailoutIncompleteVar] hdparm-9.65/geom.c:115:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENODEV [valueFlowBailoutIncompleteVar] hdparm-9.65/geom.c:197:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/geom.c:226:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/geom.c:256:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] hdparm-9.65/geom.c:231:18: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] hdparm-9.65/geom.c:221:17: style: Variable 'entry' can be declared as pointer to const [constVariablePointer] hdparm-9.65/geom.c:148:10: style: Variable 'err' is assigned a value that is never used. [unreadVariable] hdparm-9.65/hdparm.c:253:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:270:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PROT_READ [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:305:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ITIMER_REAL [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:380:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOMEM [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:830:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:846:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:951:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1108:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1131:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1155:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1165:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1181:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1230:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1278:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1339:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1414:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1524:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __u64 [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1559:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PROT_READ [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1631:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1679:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1717:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1783:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1817:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1849:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1863:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EIO [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1903:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:1998:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:2038:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:2923:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:2948:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:2985:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:3006:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:3064:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:3110:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:3147:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:3222:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:3239:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EINVAL [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:3251:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EINVAL [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:3343:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:3425:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EINVAL [valueFlowBailoutIncompleteVar] hdparm-9.65/hdparm.c:2666:16: style: Condition 'args[0]=ATA_OP_CHECKPOWERMODE2' is always true [knownConditionTrueFalse] hdparm-9.65/hdparm.c:253:5: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/hdparm.c:253:5: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/hdparm.c:594:6: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/hdparm.c:1665:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] hdparm-9.65/hdparm.c:1753:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] hdparm-9.65/hdparm.c:2359:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/hdparm.c:2603:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/hdparm.c:2965:2: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/hdparm.c:3010:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/hdparm.c:3026:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] hdparm-9.65/hdparm.c:3038:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] hdparm-9.65/hdparm.c:3070:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] hdparm-9.65/hdparm.c:3351:4: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/hdparm.c:1215:3: error: Memory leak: fdevname [memleak] hdparm-9.65/hdparm.c:276:3: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] hdparm-9.65/hdparm.c:270:12: note: Assuming allocation function fails hdparm-9.65/hdparm.c:270:12: note: Assignment 'buf=mmap(NULL,len,PROT_READ|PROT_WRITE,MAP_ANONYMOUS|MAP_PRIVATE,-1,0)', assigned value is 0 hdparm-9.65/hdparm.c:276:3: note: Null pointer dereference hdparm-9.65/hdparm.c:462:10: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] hdparm-9.65/hdparm.c:472:29: note: Assuming allocation function fails hdparm-9.65/hdparm.c:472:29: note: Calling function 'strip', 1st argument 'strndup((char*)&idw[27],40)' value is 0 hdparm-9.65/hdparm.c:462:10: note: Null pointer dereference hdparm-9.65/hdparm.c:1570:3: warning: If memory allocation fails, then there is a possible null pointer dereference: data [nullPointerOutOfMemory] hdparm-9.65/hdparm.c:1559:13: note: Assuming allocation function fails hdparm-9.65/hdparm.c:1559:13: note: Assignment 'data=mmap(NULL,data_bytes,PROT_READ|PROT_WRITE,MAP_SHARED|MAP_ANONYMOUS,-1,0)', assigned value is 0 hdparm-9.65/hdparm.c:1570:3: note: Null pointer dereference hdparm-9.65/hdparm.c:1575:9: warning: If memory allocation fails, then there is a possible null pointer dereference: data [nullPointerOutOfMemory] hdparm-9.65/hdparm.c:1559:13: note: Assuming allocation function fails hdparm-9.65/hdparm.c:1559:13: note: Assignment 'data=mmap(NULL,data_bytes,PROT_READ|PROT_WRITE,MAP_SHARED|MAP_ANONYMOUS,-1,0)', assigned value is 0 hdparm-9.65/hdparm.c:1575:9: note: Null pointer dereference hdparm-9.65/hdparm.c:1736:9: warning: If memory allocation fails, then there is a possible null pointer dereference: data [nullPointerOutOfMemory] hdparm-9.65/hdparm.c:1730:13: note: Assuming allocation function fails hdparm-9.65/hdparm.c:1730:13: note: Assignment 'data=mmap(NULL,data_bytes,PROT_READ|PROT_WRITE,MAP_SHARED|MAP_ANONYMOUS,-1,0)', assigned value is 0 hdparm-9.65/hdparm.c:1736:9: note: Null pointer dereference hdparm-9.65/hdparm.c:1744:11: warning: If memory allocation fails, then there is a possible null pointer dereference: data [nullPointerOutOfMemory] hdparm-9.65/hdparm.c:1730:13: note: Assuming allocation function fails hdparm-9.65/hdparm.c:1730:13: note: Assignment 'data=mmap(NULL,data_bytes,PROT_READ|PROT_WRITE,MAP_SHARED|MAP_ANONYMOUS,-1,0)', assigned value is 0 hdparm-9.65/hdparm.c:1744:11: note: Null pointer dereference hdparm-9.65/hdparm.c:462:20: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] hdparm-9.65/hdparm.c:472:29: note: Assuming allocation function fails hdparm-9.65/hdparm.c:472:29: note: Calling function 'strip', 1st argument 'strndup((char*)&idw[27],40)' value is 0 hdparm-9.65/hdparm.c:462:20: note: Null pointer addition hdparm-9.65/hdparm.c:2821:15: style: Redundant initialization for 'dco_max'. The initialized value is overwritten before it is read. [redundantInitialization] hdparm-9.65/hdparm.c:2820:21: note: dco_max is initialized hdparm-9.65/hdparm.c:2821:15: note: dco_max is overwritten hdparm-9.65/hdparm.c:3111:8: style: Redundant initialization for 'value'. The initialized value is overwritten before it is read. [redundantInitialization] hdparm-9.65/hdparm.c:3096:14: note: value is initialized hdparm-9.65/hdparm.c:3111:8: note: value is overwritten hdparm-9.65/hdparm.c:771:14: style: Local variable 'lba_limit' shadows outer variable [shadowVariable] hdparm-9.65/hdparm.c:3089:20: note: Shadowed declaration hdparm-9.65/hdparm.c:771:14: note: Shadow variable hdparm-9.65/hdparm.c:1710:36: style: Local variable 'lba_limit' shadows outer variable [shadowVariable] hdparm-9.65/hdparm.c:3089:20: note: Shadowed declaration hdparm-9.65/hdparm.c:1710:36: note: Shadow variable hdparm-9.65/hdparm.c:203:40: style: Parameter 'dcobuffer' can be declared as pointer to const [constParameterPointer] hdparm-9.65/hdparm.c:472:8: style: Variable 'model' can be declared as pointer to const [constVariablePointer] hdparm-9.65/hdparm.c:473:8: style: Variable 'fwrev' can be declared as pointer to const [constVariablePointer] hdparm-9.65/hdparm.c:474:8: style: Variable 'serno' can be declared as pointer to const [constVariablePointer] hdparm-9.65/hdparm.c:692:38: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] hdparm-9.65/hdparm.c:1096:18: style: Variable 'b' can be declared as pointer to const [constVariablePointer] hdparm-9.65/hdparm.c:1126:16: style: Variable 'page0' can be declared as pointer to const [constVariablePointer] hdparm-9.65/hdparm.c:1199:20: style: Variable 'b' can be declared as pointer to const [constVariablePointer] hdparm-9.65/hdparm.c:1260:19: style: Variable 'b' can be declared as pointer to const [constVariablePointer] hdparm-9.65/hdparm.c:1548:101: style: Parameter 'sr' can be declared as pointer to const [constParameterPointer] hdparm-9.65/hdparm.c:1580:27: style: Parameter 'idw' can be declared as pointer to const [constParameterPointer] hdparm-9.65/hdparm.c:2029:25: style: Parameter 'devname' can be declared as pointer to const [constParameterPointer] hdparm-9.65/hdparm.c:3143:34: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] hdparm-9.65/identify.c:770:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EINVAL [valueFlowBailoutIncompleteVar] hdparm-9.65/identify.c:1273:35: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] hdparm-9.65/identify.c:1270:32: note: outer condition: (val[83]&0xc000)==0x4000 hdparm-9.65/identify.c:1273:35: note: identical inner condition: (val[83]&0xc000)==0x4000 hdparm-9.65/identify.c:545:32: style: Parameter 'p' can be declared as pointer to const [constParameterPointer] hdparm-9.65/identify.c:597:39: style: Parameter 'val' can be declared as const array [constParameter] hdparm-9.65/identify.c:658:31: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] hdparm-9.65/identify.c:668:47: style: Parameter 'id' can be declared as pointer to const [constParameterPointer] hdparm-9.65/identify.c:732:31: style: Parameter 'id_supplied' can be declared as pointer to const [constParameterPointer] hdparm-9.65/identify.c:673:12: style: Variable 'deto' is assigned a value that is never used. [unreadVariable] hdparm-9.65/identify.c:674:12: style: Variable 'mdat' is assigned a value that is never used. [unreadVariable] hdparm-9.65/sgio.c:419:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/sgio.c:513:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/sgio.c:510:2: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] hdparm-9.65/sgio.c:368:61: style:inconclusive: Function 'do_drive_cmd' argument 3 names different: declaration 'timeout' definition 'timeout_secs'. [funcArgNamesDifferent] hdparm-9.65/sgio.h:235:61: note: Function 'do_drive_cmd' argument 3 names different: declaration 'timeout' definition 'timeout_secs'. hdparm-9.65/sgio.c:368:61: note: Function 'do_drive_cmd' argument 3 names different: declaration 'timeout' definition 'timeout_secs'. hdparm-9.65/sgio.c:510:15: style: Variable 'timeout_secs' is assigned a value that is never used. [unreadVariable] hdparm-9.65/sysfs.c:40:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/sysfs.c:78:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/sysfs.c:97:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/sysfs.c:131:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] hdparm-9.65/sysfs.c:141:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/sysfs.c:156:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] hdparm-9.65/sysfs.c:202:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] hdparm-9.65/sysfs.c:102:18: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] hdparm-9.65/sysfs.c:80:33: warning: Either the condition 'val2' is redundant or there is possible null pointer dereference: val2. [nullPointerRedundantCheck] hdparm-9.65/sysfs.c:81:17: note: Assuming that condition 'val2' is not redundant hdparm-9.65/sysfs.c:80:33: note: Null pointer dereference hdparm-9.65/sysfs.c:32:83: style: Parameter 'val' can be declared as pointer to const [constParameterPointer] hdparm-9.65/sysfs.c:93:17: style: Variable 'entry' can be declared as pointer to const [constVariablePointer] hdparm-9.65/wdidle3.c:64:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] hdparm-9.65/wdidle3.c:106:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __func__ [valueFlowBailoutIncompleteVar] hdparm-9.65/wdidle3.c:122:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __func__ [valueFlowBailoutIncompleteVar] hdparm-9.65/wdidle3.c:141:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __func__ [valueFlowBailoutIncompleteVar] hdparm-9.65/wdidle3.c:0:0: debug: ValueFlow maximum iterations exceeded [valueFlowMaxIterations] hdparm-9.65/wdidle3.c:79:59: style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] hdparm-9.65/wdidle3.c:204:3: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/wdidle3.c:204:3: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/wdidle3.c:209:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/wdidle3.c:210:3: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/wdidle3.c:210:3: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] hdparm-9.65/wdidle3.c:176:54: style:inconclusive: Function 'wdidle3_msecs_to_timeout' argument 1 names different: declaration 'msecs' definition 'secs'. [funcArgNamesDifferent] hdparm-9.65/hdparm.h:34:54: note: Function 'wdidle3_msecs_to_timeout' argument 1 names different: declaration 'msecs' definition 'secs'. hdparm-9.65/wdidle3.c:176:54: note: Function 'wdidle3_msecs_to_timeout' argument 1 names different: declaration 'msecs' definition 'secs'. hdparm-9.65/hdparm.c:462:10: warning: If memory allocation fails, then there is a possible null pointer dereference: s [ctunullpointerOutOfMemory] hdparm-9.65/hdparm.c:472:29: note: Assuming allocation function fails hdparm-9.65/hdparm.c:472:21: note: Calling function strip, 1st argument is null hdparm-9.65/hdparm.c:462:10: note: Dereferencing argument s that is null diff: head hdparm-9.65/hdparm.c:462:10: warning: If memory allocation fails, then there is a possible null pointer dereference: s [ctunullpointerOutOfMemory] hdparm-9.65/hdparm.c:472:29: note: Assuming allocation function fails hdparm-9.65/hdparm.c:472:21: note: Calling function strip, 1st argument is null hdparm-9.65/hdparm.c:462:10: note: Dereferencing argument s that is null 2.17.0 hdparm-9.65/hdparm.c:462:20: error: If memory allocation fail: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] hdparm-9.65/hdparm.c:472:29: note: Assuming allocation function fails hdparm-9.65/hdparm.c:472:29: note: Calling function 'strip', 1st argument 'strndup((char*)&idw[27],40)' value is 0 hdparm-9.65/hdparm.c:462:20: note: Null pointer addition head hdparm-9.65/hdparm.c:462:20: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] hdparm-9.65/hdparm.c:472:29: note: Assuming allocation function fails hdparm-9.65/hdparm.c:472:29: note: Calling function 'strip', 1st argument 'strndup((char*)&idw[27],40)' value is 0 hdparm-9.65/hdparm.c:462:20: note: Null pointer addition DONE