2024-04-24 03:16 ftp://ftp.de.debian.org/debian/pool/main/c/conmon/conmon_2.1.10+ds1.orig.tar.xz cppcheck-options: --library=posix --library=gnu --library=gtk --library=bsd --check-library --inconclusive --enable=style,information --inline-suppr --disable=missingInclude --suppress=unmatchedSuppression --template=daca2 --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning -D__GNUC__ --platform=unix64 -j2 platform: Linux-6.6.15-amd64-x86_64-with-glibc2.37 python: 3.11.8 client-version: 1.3.53 compiler: g++ (Debian 13.2.0-13) 13.2.0 cppcheck: head 2.14.0 head-info: 7dab204 (2024-04-23 22:20:29 +0200) count: 106 106 elapsed-time: 0.8 0.8 head-timing-info: old-timing-info: head results: conmon-2.1.10/src/cli.c:132:29: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] conmon-2.1.10/src/close_fds.c:54:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FD_SETSIZE [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/close_fds.c:84:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FD_SETSIZE [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/close_fds.c:44:13: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] conmon-2.1.10/src/close_fds.c:98:13: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] conmon-2.1.10/src/cmsg.c:77:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable iov_base [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/cmsg.c:123:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/cmsg.c:111:7: style: Variable 'fdptr' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/conmon.c:428:17: debug: Scope::checkVariable found variable 'value' with varid 0. [varid0] conmon-2.1.10/src/conn_sock.c:175:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:222:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SOCK_SEQPACKET [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:236:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SOCK_NONBLOCK [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:274:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_PATH [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:337:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:364:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:376:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:402:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_IO_IN [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:415:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_REMOVE [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:494:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SHUT_RD [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:527:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:547:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_IO_IN [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:562:73: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MSG_DONTWAIT [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conn_sock.c:579:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_REMOVE [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conmon.c:30:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conmon.c:41:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/conmon.c:353:7: style: Local variable 'ret' shadows outer variable [shadowVariable] conmon-2.1.10/src/conmon.c:138:6: note: Shadowed declaration conmon-2.1.10/src/conmon.c:353:7: note: Shadow variable conmon-2.1.10/src/conmon.c:144:23: style: Variable 'seccomp_listener' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/conmon.c:202:23: style: Variable 'attach_symlink_dir_path' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/conmon.c:48:30: style: Variable 'dummyfd' is assigned a value that is never used. [unreadVariable] conmon-2.1.10/src/conmon.c:79:21: style: Variable 'dev_null_r_cleanup' is assigned a value that is never used. [unreadVariable] conmon-2.1.10/src/conmon.c:83:21: style: Variable 'dev_null_w_cleanup' is assigned a value that is never used. [unreadVariable] conmon-2.1.10/src/conmon.c:205:11: style: Variable 'dummyfd' is assigned a value that is never used. [unreadVariable] conmon-2.1.10/src/conn_sock.c:169:24: style: Local variable 'bname' shadows outer variable [shadowVariable] conmon-2.1.10/src/conn_sock.c:163:8: note: Shadowed declaration conmon-2.1.10/src/conn_sock.c:169:24: note: Shadow variable conmon-2.1.10/src/conn_sock.c:169:9: style: Variable 'dname' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/conn_sock.c:169:24: style: Variable 'bname' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/conn_sock.c:232:32: style: Parameter 'socket_path' can be declared as pointer to const [constParameterPointer] conmon-2.1.10/src/conn_sock.c:355:42: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] conmon-2.1.10/src/ctr_exit.c:30:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_exit.c:44:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WNOHANG [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_exit.c:78:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_REMOVE [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_exit.c:89:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_CONTINUE [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_exit.c:95:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_exit.c:119:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_exit.c:138:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_DFL [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_exit.c:227:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:110:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:190:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:239:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:331:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:386:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:470:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:505:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable iov_base [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:522:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable iov_base [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:552:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CLOCK_REALTIME [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:611:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:637:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_stdio.c:22:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_IO_IN [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_stdio.c:134:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_stdio.c:160:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_REMOVE [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctr_logging.c:186:17: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] conmon-2.1.10/src/ctr_logging.c:187:15: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] conmon-2.1.10/src/ctr_logging.c:330:11: style: Condition 'err<0' is always true [knownConditionTrueFalse] conmon-2.1.10/src/ctr_logging.c:329:29: note: Calling function 'sd_journal_sendv' returns -1 conmon-2.1.10/src/ctr_logging.c:329:29: note: Assignment 'err=sd_journal_sendv(bufv.iov,bufv.iovcnt)', assigned value is -1 conmon-2.1.10/src/ctr_logging.c:330:11: note: Condition 'err<0' is always true conmon-2.1.10/src/ctr_logging.c:254:56: style:inconclusive: Function 'write_journald' argument 3 names different: declaration 'num_read' definition 'buflen'. [funcArgNamesDifferent] conmon-2.1.10/src/ctr_logging.c:84:56: note: Function 'write_journald' argument 3 names different: declaration 'num_read' definition 'buflen'. conmon-2.1.10/src/ctr_logging.c:254:56: note: Function 'write_journald' argument 3 names different: declaration 'num_read' definition 'buflen'. conmon-2.1.10/src/ctr_logging.c:105:135: style: Parameter 'tag' can be declared as pointer to const [constParameterPointer] conmon-2.1.10/src/ctr_logging.c:607:23: style: Variable 'k8s_log_path_tmp' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/ctr_logging.c:351:30: style: Variable 'bytes_to_be_written' is assigned a value that is never used. [unreadVariable] conmon-2.1.10/src/ctrl.c:28:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctrl.c:110:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctrl.c:141:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctrl.c:179:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctrl.c:232:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TIOCSWINSZ [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctrl.c:241:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctrl.c:252:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctrl.c:263:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/ctrl.c:32:30: error: Null pointer dereference [nullPointer] conmon-2.1.10/src/ctrl.c:106:47: style: Parameter 'line' can be declared as pointer to const. However it seems that 'process_winsz_ctrl_line' is a callback function, if 'line' is declared with const you might also need to cast function pointer(s). [constParameterCallback] conmon-2.1.10/src/ctrl.c:98:35: note: You might need to cast the function pointer here conmon-2.1.10/src/ctrl.c:106:47: note: Parameter 'line' can be declared as pointer to const conmon-2.1.10/src/ctrl.c:133:50: style: Parameter 'line' can be declared as pointer to const. However it seems that 'process_terminal_ctrl_line' is a callback function, if 'line' is declared with const you might also need to cast function pointer(s). [constParameterCallback] conmon-2.1.10/src/ctrl.c:124:35: note: You might need to cast the function pointer here conmon-2.1.10/src/ctrl.c:133:50: note: Parameter 'line' can be declared as pointer to const conmon-2.1.10/src/ctrl.c:148:24: style: Variable 'hw_str' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/ctrl.c:186:8: style: Variable 'beg' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/ctrl.c:258:56: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] conmon-2.1.10/src/parent_pipe_fd.c:19:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/parent_pipe_fd.c:55:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/parent_pipe_fd.c:15:8: style: Variable 'pipe_str' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/parent_pipe_fd.c:45:23: style: Variable 'json' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/parent_pipe_fd.c:47:24: style: Variable 'escaped_message' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/runtime_args.c:99:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/runtime_args.c:16:41: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:20:44: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:25:61: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:30:118: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:32:34: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:40:100: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:42:39: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:44:45: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:61:103: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:74:61: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:79:52: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:83:32: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] conmon-2.1.10/src/runtime_args.c:91:35: style:inconclusive: Function 'print_argv' argument 1 names different: declaration 'argv' definition 'runtime_argv'. [funcArgNamesDifferent] conmon-2.1.10/src/runtime_args.c:10:35: note: Function 'print_argv' argument 1 names different: declaration 'argv' definition 'runtime_argv'. conmon-2.1.10/src/runtime_args.c:91:35: note: Function 'print_argv' argument 1 names different: declaration 'argv' definition 'runtime_argv'. conmon-2.1.10/src/runtime_args.c:106:8: style: Variable 'arg' can be declared as pointer to const [constVariablePointer] conmon-2.1.10/src/seccomp_notify.c:306:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/utils.c:48:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/utils.c:60:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EINTR [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/utils.c:69:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_BLOCK [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/utils.c:81:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] conmon-2.1.10/src/utils.c:22:76: style: Parameter 'tag' can be declared as pointer to const [constParameterPointer] diff: DONE