2024-04-18 06:53 ftp://ftp.de.debian.org/debian/pool/main/libu/libu2f-host/libu2f-host_1.1.10.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=bsd --library=openssl --library=microsoft_sal --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning -D__GNUC__ --platform=unix64 -j2 platform: Linux-4.18.0-513.9.1.el8_9.cloud.0.1.x86_64-x86_64-with-glibc2.28 python: 3.10.2 client-version: 1.3.56 compiler: g++ (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4) cppcheck: head 2.13.0 head-info: 397464e (2024-04-17 17:31:21 +0200) count: 52 36 elapsed-time: 3.7 0.9 head-timing-info: old-timing-info: head results: libu2f-host-1.1.10/gl/check-version.c:38:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VERSION [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/src/cmdline.c:117:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VERSION [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/src/cmdline.c:272:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/src/cmdline.c:309:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/src/cmdline.c:416:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/src/cmdline.c:472:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/src/cmdline.c:586:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/src/cmdline.c:266:66: style: Parameter 'args_info' can be declared as pointer to const [constParameterPointer] libu2f-host-1.1.10/src/cmdline.c:407:55: style: Parameter 'args_info' can be declared as pointer to const [constParameterPointer] libu2f-host-1.1.10/src/cmdline.c:459:9: style: Variable 'stop_char' can be declared as pointer to const [constVariablePointer] libu2f-host-1.1.10/src/cmdline.c:561:35: style: Parameter 'params' can be declared as pointer to const [constParameterPointer] libu2f-host-1.1.10/src/cmdline.c:595:28: style: Variable 'long_options' can be declared as const array [constVariable] libu2f-host-1.1.10/src/u2f-host.c:34:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/src/u2f-host.c:39:17: style: Variable 'flags' is assigned a value that is never used. [unreadVariable] libu2f-host-1.1.10/tests/basic.c:39:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_VERSION_STRING [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/tests/basic.c:72:37: warning: Either the condition 's==NULL' is redundant or there is possible null pointer dereference: s. [nullPointerRedundantCheck] libu2f-host-1.1.10/tests/basic.c:70:11: note: Assuming that condition 's==NULL' is not redundant libu2f-host-1.1.10/tests/basic.c:72:37: note: Null pointer dereference libu2f-host-1.1.10/u2f-host/authenticate.c:30:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_JSON_ERROR [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/authenticate.c:102:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_MEMORY_ERROR [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/authenticate.c:143:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_OK [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/authenticate.c:173:4: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] libu2f-host-1.1.10/u2f-host/authenticate.c:173:4: error: Invalid usleep() argument nr 1. The value is 1000000 but the valid values are '0:999999'. [invalidFunctionArg] libu2f-host-1.1.10/u2f-host/authenticate.c:189:41: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] libu2f-host-1.1.10/u2f-host/authenticate.c:171:29: error: Uninitialized variable: len [uninitvar] libu2f-host-1.1.10/u2f-host/authenticate.c:171:49: error: Uninitialized variable: buf [uninitvar] libu2f-host-1.1.10/u2f-host/cdecode.c:50:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable step_a [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/cdecode.c:73:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable step_a [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/cencode.c:34:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable step_A [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/cencode.c:69:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable step_A [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/cencode.c:113:62: style: Parameter 'state_in' can be declared as pointer to const [constParameterPointer] libu2f-host-1.1.10/u2f-host/devs.c:286:0: error: #error "please provide an implementation of obtain_nonce() for your platform" [preprocessorErrorDirective] libu2f-host-1.1.10/u2f-host/error.c:25:7: style: struct member 'err_t::rc' is never used. [unusedStructMember] libu2f-host-1.1.10/u2f-host/global.c:36:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_DEBUG [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/register.c:29:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_JSON_ERROR [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/register.c:86:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_MEMORY_ERROR [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/register.c:117:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_JSON_ERROR [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/register.c:165:7: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] libu2f-host-1.1.10/u2f-host/register.c:165:7: error: Invalid usleep() argument nr 1. The value is 1000000 but the valid values are '0:999999'. [invalidFunctionArg] libu2f-host-1.1.10/u2f-host/register.c:168:10: style: Condition 'len==2' is always true [knownConditionTrueFalse] libu2f-host-1.1.10/u2f-host/register.c:161:15: note: Assuming that condition 'len!=2' is not redundant libu2f-host-1.1.10/u2f-host/register.c:168:10: note: Condition 'len==2' is always true libu2f-host-1.1.10/u2f-host/register.c:150:41: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] libu2f-host-1.1.10/u2f-host/u2fmisc.c:42:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/u2fmisc.c:51:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_JSON_ERROR [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/u2fmisc.c:112:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_MEMORY_ERROR [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/u2fmisc.c:160:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_NO_U2F_DEVICE [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/u2fmisc.c:335:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_MEMORY_ERROR [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/u2fmisc.c:388:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_JSON_ERROR [valueFlowBailoutIncompleteVar] libu2f-host-1.1.10/u2f-host/u2fmisc.c:127:18: style: Condition 'app_id' is always true [knownConditionTrueFalse] libu2f-host-1.1.10/u2f-host/u2fmisc.c:311:6: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libu2f-host-1.1.10/u2f-host/u2fmisc.c:311:6: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] libu2f-host-1.1.10/u2f-host/u2fmisc.c:104:29: style:inconclusive: Function 'prepare_origin' argument 1 names different: declaration 'origin' definition 'jsonstr'. [funcArgNamesDifferent] libu2f-host-1.1.10/u2f-host/internal.h:70:33: note: Function 'prepare_origin' argument 1 names different: declaration 'origin' definition 'jsonstr'. libu2f-host-1.1.10/u2f-host/u2fmisc.c:104:29: note: Function 'prepare_origin' argument 1 names different: declaration 'origin' definition 'jsonstr'. libu2f-host-1.1.10/u2f-host/u2fmisc.c:37:25: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] libu2f-host-1.1.10/u2f-host/u2fmisc.c:222:17: style: Variable 'timeout' is assigned a value that is never used. [unreadVariable] libu2f-host-1.1.10/u2f-host/u2fmisc.c:223:12: style: Variable 'rc' is assigned a value that is never used. [unreadVariable] diff: head libu2f-host-1.1.10/src/cmdline.c:272:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/src/cmdline.c:309:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/src/cmdline.c:416:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/src/cmdline.c:472:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/src/cmdline.c:586:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable optarg [valueFlowBailoutIncompleteVar] 2.13.0 libu2f-host-1.1.10/src/u2f-host.c:32:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EXIT_FAILURE [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/src/u2f-host.c:34:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] 2.13.0 libu2f-host-1.1.10/tests/basic.c:36:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EXIT_FAILURE [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/tests/basic.c:39:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_VERSION_STRING [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/authenticate.c:102:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_MEMORY_ERROR [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/authenticate.c:143:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_OK [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/cdecode.c:73:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable step_a [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/cencode.c:69:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable step_A [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/register.c:117:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_JSON_ERROR [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/register.c:86:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_MEMORY_ERROR [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/u2fmisc.c:112:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_MEMORY_ERROR [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/u2fmisc.c:160:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_NO_U2F_DEVICE [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/u2fmisc.c:335:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_MEMORY_ERROR [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/u2fmisc.c:388:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_JSON_ERROR [valueFlowBailoutIncompleteVar] head libu2f-host-1.1.10/u2f-host/u2fmisc.c:51:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable U2FH_JSON_ERROR [valueFlowBailoutIncompleteVar] DONE