2025-07-01 08:18 ftp://ftp.de.debian.org/debian/pool/main/u/uanytun/uanytun_0.3.7.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=openssl --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-62-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: dfa16af (2025-06-30 19:43:56 +0200) count: 83 82 elapsed-time: 1.4 1.7 head-timing-info: old-timing-info: head results: uanytun-0.3.7/src/auth_algo.c:267:13: style: Variable 'hmac' can be declared as pointer to const [constVariablePointer] uanytun-0.3.7/src/auth_algo.c:321:13: style: Variable 'hmac' can be declared as pointer to const [constVariablePointer] uanytun-0.3.7/src/auth_algo.c:324:13: style: Variable 'tag' can be declared as pointer to const [constVariablePointer] uanytun-0.3.7/src/bsd/tun.c:256:0: error: #error This Device works just for OpenBSD, FreeBSD or NetBSD [preprocessorErrorDirective] uanytun-0.3.7/src/bsd/tun.c:256:3: error: #error This Device works just for OpenBSD, FreeBSD or NetBSD [preprocessorErrorDirective] uanytun-0.3.7/src/cipher.c:236:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GCRY_CIPHER_AES128 [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/cipher.c:193:37: style: Parameter 'in' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/encrypted_packet.c:68:67: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/encrypted_packet.c:84:59: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/encrypted_packet.c:115:67: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/encrypted_packet.c:142:72: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/encrypted_packet.c:159:68: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/encrypted_packet.c:168:58: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/encrypted_packet.c:184:64: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/encrypted_packet.c:200:52: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/key_derivation.c:162:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GCRY_MD_SHA256 [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/key_derivation.c:227:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GCRY_MD_SHA1 [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/key_derivation.c:396:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GCRY_CIPHER_AES128 [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/key_derivation.c:68:112: style: Parameter 'key' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/key_derivation.c:68:146: style: Parameter 'salt' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/linux/tun.c:82:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/linux/tun.c:165:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable iov_base [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/linux/tun.c:191:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETH_P_IP [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/linux/tun.c:213:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/linux/tun.c:131:33: style: Parameter 'dev' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/linux/tun.c:155:28: style: Parameter 'dev' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/linux/tun.c:175:29: style: Parameter 'dev' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/linux/tun.c:187:19: style: Variable 'hdr' can be declared as pointer to const [constVariablePointer] uanytun-0.3.7/src/linux/tun.c:205:36: style: Parameter 'dev' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/log_targets.h:126:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable logname_ [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log_targets.h:164:122: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable facility_ [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log_targets.h:173:69: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable facility_ [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log_targets.h:187:52: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable logname_ [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log_targets.h:255:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable logfilename_ [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log_targets.h:266:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable file_ [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log_targets.h:276:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable file_ [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log_targets.h:285:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable file_ [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log_targets.h:294:50: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable logfilename_ [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log_targets.h:352:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/log.c:260:18: portability: %d in format string (no. 1) requires 'int' but the argument type is 'u_int32_t {aka unsigned int}'. [invalidPrintfArgType_sint] uanytun-0.3.7/src/log.c:93:19: warning: Either the condition '!targets' is redundant or there is possible null pointer dereference: targets. [nullPointerRedundantCheck] uanytun-0.3.7/src/log.c:93:6: note: Assuming that condition '!targets' is not redundant uanytun-0.3.7/src/log.c:93:19: note: Null pointer dereference uanytun-0.3.7/src/log.c:193:8: warning:inconclusive: Found suspicious operator '*', result is not used. [constStatement] uanytun-0.3.7/src/log_targets.h:168:42: style: Parameter 'self' can be declared as pointer to const. However it seems that 'log_target_syslog_log' is a callback function, if 'self' is declared with const you might also need to cast function pointer(s). [constParameterCallback] uanytun-0.3.7/src/log_targets.h:202:15: note: You might need to cast the function pointer here uanytun-0.3.7/src/log_targets.h:168:42: note: Parameter 'self' can be declared as pointer to const uanytun-0.3.7/src/log_targets.h:323:42: style: Parameter 'self' can be declared as pointer to const. However it seems that 'log_target_stdout_log' is a callback function, if 'self' is declared with const you might also need to cast function pointer(s). [constParameterCallback] uanytun-0.3.7/src/log_targets.h:337:15: note: You might need to cast the function pointer here uanytun-0.3.7/src/log_targets.h:323:42: note: Parameter 'self' can be declared as pointer to const uanytun-0.3.7/src/options.c:483:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VERSION_STRING [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/options.c:525:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] uanytun-0.3.7/src/options.c:529:3: portability: %d in format string (no. 1) requires 'int' but the argument type is 'u_int32_t {aka unsigned int}'. [invalidPrintfArgType_sint] uanytun-0.3.7/src/options.c:541:3: portability: %d in format string (no. 1) requires 'int' but the argument type is 'u_int32_t {aka unsigned int}'. [invalidPrintfArgType_sint] uanytun-0.3.7/src/options.c:545:3: portability: %d in format string (no. 1) requires 'int' but the argument type is 'u_int32_t {aka unsigned int}'. [invalidPrintfArgType_sint] uanytun-0.3.7/src/options.c:246:11: style: Variable 'str' can be declared as pointer to const [constVariablePointer] uanytun-0.3.7/src/plain_packet.c:81:51: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/plain_packet.c:112:59: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/plain_packet.c:131:54: style: Parameter 'packet' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/plain_packet.c:150:16: style: Variable 'hdr' can be declared as pointer to const [constVariablePointer] uanytun-0.3.7/src/sig_handler.c:78:80: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/sig_handler.c:131:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_BLOCK [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/sig_handler.c:161:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_DFL [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/sig_handler.c:71:7: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] uanytun-0.3.7/src/sysexec.c:72:82: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/init_crypt.h:93:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GCRYCTL_DISABLE_SECMEM [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/daemon.h:101:79: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/daemon.h:130:69: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/daemon.h:148:78: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/uanytun.c:131:68: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/uanytun.c:171:69: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/uanytun.c:255:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/uanytun.c:312:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/daemon.h:74:15: portability: Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. [prohibitedgetpwnamCalled] uanytun-0.3.7/src/daemon.h:81:17: portability: Non reentrant function 'getgrnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrnam_r'. [prohibitedgetgrnamCalled] uanytun-0.3.7/src/daemon.h:83:17: portability: Non reentrant function 'getgrgid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrgid_r'. [prohibitedgetgrgidCalled] uanytun-0.3.7/src/uanytun.c:249:10: warning: Either the condition 'sig_fd<0' is redundant or FD_SET() argument nr 1 can have invalid value. The value is -1 but the valid values are '0:'. [invalidFunctionArg] uanytun-0.3.7/src/uanytun.c:246:13: note: Assuming that condition 'sig_fd<0' is not redundant uanytun-0.3.7/src/uanytun.c:249:10: note: Invalid argument uanytun-0.3.7/src/uanytun.c:278:10: style: Condition 'return_value' is always false [knownConditionTrueFalse] uanytun-0.3.7/src/uanytun.c:277:38: note: Calling function 'process_tun_data' returns 0 uanytun-0.3.7/src/uanytun.c:277:38: note: Assignment 'return_value=process_tun_data(dev,sock,opt,&plain_packet,&encrypted_packet,&c,&aa,&kd,&seq_nr)', assigned value is 0 uanytun-0.3.7/src/uanytun.c:278:10: note: Condition 'return_value' is always false uanytun-0.3.7/src/uanytun.c:254:9: style: Local variable 'ret' shadows outer variable [shadowVariable] uanytun-0.3.7/src/uanytun.c:235:7: note: Shadowed declaration uanytun-0.3.7/src/uanytun.c:254:9: note: Shadow variable uanytun-0.3.7/src/uanytun.c:386:17: style: Local variable 'argv' shadows outer argument [shadowArgument] uanytun-0.3.7/src/uanytun.c:304:26: note: Shadowed declaration uanytun-0.3.7/src/uanytun.c:386:17: note: Shadow variable uanytun-0.3.7/src/uanytun.c:123:65: style: Parameter 'opt' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/uanytun.c:160:74: style: Parameter 'opt' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/udp.c:78:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SOCK_DGRAM [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/udp.c:218:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SOCK_DGRAM [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/udp.c:326:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INET6_ADDRSTRLEN [valueFlowBailoutIncompleteVar] uanytun-0.3.7/src/udp.c:321:46: style: Parameter 'e' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/udp.c:345:21: style: Parameter 'sock' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/udp.c:354:22: style: Parameter 'sock' can be declared as pointer to const [constParameterPointer] uanytun-0.3.7/src/udp.c:354:38: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] diff: head uanytun-0.3.7/src/bsd/tun.c:256:3: error: #error This Device works just for OpenBSD, FreeBSD or NetBSD [preprocessorErrorDirective] DONE