2026-05-01 15:23 ftp://ftp.de.debian.org/debian/pool/main/d/dmidecode/dmidecode_3.7.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 -j6 platform: Linux-7.0.3+deb14-amd64-x86_64-with-glibc2.42 python: 3.13.12 client-version: 1.4.0 compiler: g++ (Debian 15.2.0-17) 15.2.0 cppcheck: head 2.20.0 head-info: e5c4a734 (2026-05-01 11:10:43 +0200) count: 75 66 elapsed-time: 0.8 0.7 head-timing-info: old-timing-info: head results: dmidecode-3.7/ownership.c:129:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] dmidecode-3.7/ownership.c:164:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmiopt.c:75:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmiopt.c:118:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmiopt.c:187:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmiopt.c:200:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmiopt.c:225:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmiopt.c:254:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmiopt.c:294:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] dmidecode-3.7/biosdecode.c:624:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] dmidecode-3.7/biosdecode.c:664:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/util.c:60:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] dmidecode-3.7/util.c:108:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] dmidecode-3.7/util.c:190:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] dmidecode-3.7/util.c:234:13: warning: If memory allocation fails, then there is a possible null pointer dereference: mmp [nullPointerOutOfMemory] dmidecode-3.7/util.c:228:12: note: Assuming allocation function fails dmidecode-3.7/util.c:228:12: note: Assignment 'mmp=mmap(NULL,mmoffset+len,PROT_READ,MAP_SHARED,fd,base-mmoffset)', assigned value is 0 dmidecode-3.7/util.c:234:13: note: Null pointer dereference dmidecode-3.7/util.c:232:27: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] dmidecode-3.7/util.c:228:12: note: Assuming allocation function fails dmidecode-3.7/util.c:228:12: note: Assignment 'mmp=mmap(NULL,mmoffset+len,PROT_READ,MAP_SHARED,fd,base-mmoffset)', assigned value is 0 dmidecode-3.7/util.c:232:27: note: Null pointer addition dmidecode-3.7/util.c:98:37: style:inconclusive: Function 'read_file' argument 2 names different: declaration 'len' definition 'max_len'. [funcArgNamesDifferent] dmidecode-3.7/util.h:28:37: note: Function 'read_file' argument 2 names different: declaration 'len' definition 'max_len'. dmidecode-3.7/util.c:98:37: note: Function 'read_file' argument 2 names different: declaration 'len' definition 'max_len'. dmidecode-3.7/ownership.c:114:54: style: Parameter 'argv' can be declared as const array [constParameter] dmidecode-3.7/ownership.c:118:16: style: Variable 'longopts' can be declared as const array [constVariable] dmidecode-3.7/ownership.c:192:7: style: Variable 'p' can be declared as pointer to const [constVariablePointer] dmidecode-3.7/dmiopt.c:265:47: style: Parameter 'argv' can be declared as const array [constParameter] dmidecode-3.7/dmiopt.c:270:16: style: Variable 'longopts' can be declared as const array [constVariable] dmidecode-3.7/vpddecode.c:143:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/vpdopt.c:55:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/vpdopt.c:68:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/vpdopt.c:109:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] dmidecode-3.7/vpdopt.c:92:47: style: Parameter 'argv' can be declared as const array [constParameter] dmidecode-3.7/vpdopt.c:96:16: style: Variable 'longopts' can be declared as const array [constVariable] dmidecode-3.7/biosdecode.c:158:2: portability: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'u8 {aka signed int}'. [invalidPrintfArgType_uint] dmidecode-3.7/biosdecode.c:158:2: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] dmidecode-3.7/biosdecode.c:221:2: portability: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'u8 {aka signed int}'. [invalidPrintfArgType_uint] dmidecode-3.7/biosdecode.c:221:2: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] dmidecode-3.7/biosdecode.c:608:54: style: Parameter 'argv' can be declared as const array [constParameter] dmidecode-3.7/biosdecode.c:612:16: style: Variable 'longopts' can be declared as const array [constVariable] dmidecode-3.7/biosdecode.c:552:2: style: int result is returned as long value. If the return value is long to avoid loss of information, then you have loss of information. [truncLongCastReturn] dmidecode-3.7/vpddecode.c:174:7: style: Variable 'p' can be declared as pointer to const [constVariablePointer] dmidecode-3.7/dmioem.c:56:33: style:inconclusive: Function 'dmi_set_vendor' argument 1 names different: declaration 's' definition 'v'. [funcArgNamesDifferent] dmidecode-3.7/dmioem.h:26:33: note: Function 'dmi_set_vendor' argument 1 names different: declaration 's' definition 'v'. dmidecode-3.7/dmioem.c:56:33: note: Function 'dmi_set_vendor' argument 1 names different: declaration 's' definition 'v'. dmidecode-3.7/dmioem.c:213:6: style: Variable 'token' can be declared as pointer to const [constVariablePointer] dmidecode-3.7/dmioem.c:239:6: style: Variable 'data' can be declared as pointer to const [constVariablePointer] dmidecode-3.7/dmidecode.c:3678:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:4014:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:4380:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:5662:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:5710:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_WRONLY [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:5839:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:5960:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:6021:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:6079:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:6103:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:6287:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] dmidecode-3.7/dmidecode.c:6267:10: style: Condition 'ret==0' is always false [knownConditionTrueFalse] dmidecode-3.7/dmidecode.c:6264:8: note: Assignment 'ret=-1', assigned value is -1 dmidecode-3.7/dmidecode.c:6267:10: note: Condition 'ret==0' is always false dmidecode-3.7/dmidecode.c:3678:4: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] dmidecode-3.7/dmidecode.c:3678:4: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] dmidecode-3.7/dmidecode.c:4380:3: portability: %d in format string (no. 1) requires 'int' but the argument type is 'u32 {aka unsigned int}'. [invalidPrintfArgType_sint] dmidecode-3.7/dmidecode.c:4402:5: portability: %d in format string (no. 1) requires 'int' but the argument type is 'u32 {aka unsigned int}'. [invalidPrintfArgType_sint] dmidecode-3.7/dmidecode.c:278:19: style:inconclusive: Function 'dmi_print_memory_size' argument 2 names different: declaration '' definition 'attr'. [funcArgNamesDifferentUnnamed] dmidecode-3.7/dmidecode.c:278:29: style:inconclusive: Function 'dmi_print_memory_size' argument 3 names different: declaration '' definition 'code'. [funcArgNamesDifferentUnnamed] dmidecode-3.7/dmidecode.c:278:39: style:inconclusive: Function 'dmi_print_memory_size' argument 4 names different: declaration '' definition 'shift'. [funcArgNamesDifferentUnnamed] dmidecode-3.7/dmidecode.c:472:20: style:inconclusive: Function 'dmi_system_uuid' argument 2 names different: declaration '' definition 'attr'. [funcArgNamesDifferentUnnamed] dmidecode-3.7/dmidecode.c:472:36: style:inconclusive: Function 'dmi_system_uuid' argument 3 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] dmidecode-3.7/dmidecode.c:472:43: style:inconclusive: Function 'dmi_system_uuid' argument 4 names different: declaration '' definition 'ver'. [funcArgNamesDifferentUnnamed] dmidecode-3.7/dmidecode.c:1184:20: style:inconclusive: Function 'dmi_print_cpuid' argument 2 names different: declaration '' definition 'label'. [funcArgNamesDifferentUnnamed] dmidecode-3.7/dmidecode.c:1184:43: style:inconclusive: Function 'dmi_print_cpuid' argument 3 names different: declaration '' definition 'sig'. [funcArgNamesDifferentUnnamed] dmidecode-3.7/dmidecode.c:1184:58: style:inconclusive: Function 'dmi_print_cpuid' argument 4 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] dmidecode-3.7/dmidecode.c:5956:47: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] dmidecode-3.7/dmidecode.c:2494:6: style: Variable 'p' can be declared as pointer to const [constVariablePointer] dmidecode-3.7/dmidecode.c:2520:6: style: Variable 'p' can be declared as pointer to const [constVariablePointer] dmidecode-3.7/dmidecode.c:2538:6: style: Variable 'p' can be declared as pointer to const [constVariablePointer] dmidecode-3.7/dmidecode.c:2555:6: style: Variable 'p' can be declared as pointer to const [constVariablePointer] dmidecode-3.7/dmidecode.c:3671:6: style: Variable 'p' can be declared as pointer to const [constVariablePointer] dmidecode-3.7/dmidecode.c:4011:43: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] dmidecode-3.7/dmidecode.c:6094:30: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] dmidecode-3.7/dmidecode.c:6153:30: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] dmidecode-3.7/dmidecode.c:3442:7: style: Variable 'off' is assigned a value that is never used. [unreadVariable] dmidecode-3.7/dmidecode.c:3444:7: style: Variable 'off' is assigned a value that is never used. [unreadVariable] diff: head dmidecode-3.7/dmidecode.c:1184:20: style:inconclusive: Function 'dmi_print_cpuid' argument 2 names different: declaration '' definition 'label'. [funcArgNamesDifferentUnnamed] head dmidecode-3.7/dmidecode.c:1184:43: style:inconclusive: Function 'dmi_print_cpuid' argument 3 names different: declaration '' definition 'sig'. [funcArgNamesDifferentUnnamed] head dmidecode-3.7/dmidecode.c:1184:58: style:inconclusive: Function 'dmi_print_cpuid' argument 4 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] head dmidecode-3.7/dmidecode.c:278:19: style:inconclusive: Function 'dmi_print_memory_size' argument 2 names different: declaration '' definition 'attr'. [funcArgNamesDifferentUnnamed] head dmidecode-3.7/dmidecode.c:278:29: style:inconclusive: Function 'dmi_print_memory_size' argument 3 names different: declaration '' definition 'code'. [funcArgNamesDifferentUnnamed] head dmidecode-3.7/dmidecode.c:278:39: style:inconclusive: Function 'dmi_print_memory_size' argument 4 names different: declaration '' definition 'shift'. [funcArgNamesDifferentUnnamed] head dmidecode-3.7/dmidecode.c:472:20: style:inconclusive: Function 'dmi_system_uuid' argument 2 names different: declaration '' definition 'attr'. [funcArgNamesDifferentUnnamed] head dmidecode-3.7/dmidecode.c:472:36: style:inconclusive: Function 'dmi_system_uuid' argument 3 names different: declaration '' definition 'p'. [funcArgNamesDifferentUnnamed] head dmidecode-3.7/dmidecode.c:472:43: style:inconclusive: Function 'dmi_system_uuid' argument 4 names different: declaration '' definition 'ver'. [funcArgNamesDifferentUnnamed] DONE