2025-11-27 18:17 ftp://ftp.de.debian.org/debian/pool/main/l/lua-readline/lua-readline_3.3.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=lua --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 -j4 platform: Linux-6.12.57+deb13-amd64-x86_64-with-glibc2.41 python: 3.13.5 client-version: 1.3.67 compiler: g++ (Debian 14.2.0-19) 14.2.0 cppcheck: head 2.18.0 head-info: d1e4660 (2025-11-27 16:20:04 +0100) count: 19 19 elapsed-time: 0.0 0.1 head-timing-info: old-timing-info: head results: readline-3.3/C-readline.c:52:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable L_ctermid [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:83:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rl_complete [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:91:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable history_length [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:178:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LUA_REGISTRYINDEX [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:184:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable L_ctermid [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:241:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rl_attempted_completion_over [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:283:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LUA_TSTRING [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:289:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LUA_TFUNCTION [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:298:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rl_attempted_completion_function [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:305:2: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable rl_completion_append_character [valueFlowBailoutIncompleteVar] readline-3.3/C-readline.c:53:23: portability: Non reentrant function 'ctermid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'ctermid_r'. [prohibitedctermidCalled] readline-3.3/C-readline.c:187:23: portability: Non reentrant function 'ctermid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'ctermid_r'. [prohibitedctermidCalled] readline-3.3/C-readline.c:277:5: warning: If memory allocation fails, then there is a possible null pointer dereference: completions [nullPointerOutOfMemory] readline-3.3/C-readline.c:259:25: note: Assuming allocation function fails readline-3.3/C-readline.c:259:25: note: Assignment 'completions=malloc(sizeof(char*)*(1+number_of_completions))', assigned value is 0 readline-3.3/C-readline.c:261:19: note: Assuming condition is false readline-3.3/C-readline.c:277:5: note: Null pointer dereference readline-3.3/C-readline.c:96:39: style: Parameter 'L' can be declared as pointer to const. However it seems that 'c_using_history' is a callback function, if 'L' is declared with const you might also need to cast function pointer(s). [constParameterCallback] readline-3.3/C-readline.c:330:31: note: You might need to cast the function pointer here readline-3.3/C-readline.c:96:39: note: Parameter 'L' can be declared as pointer to const readline-3.3/C-readline.c:101:39: style: Parameter 'L' can be declared as pointer to const. However it seems that 'c_clear_history' is a callback function, if 'L' is declared with const you might also need to cast function pointer(s). [constParameterCallback] readline-3.3/C-readline.c:322:31: note: You might need to cast the function pointer here readline-3.3/C-readline.c:101:39: note: Parameter 'L' can be declared as pointer to const readline-3.3/C-readline.c:177:47: style: Parameter 'line' can be declared as pointer to const. However it seems that 'handler_calls_lua_callback' is a callback function, if 'line' is declared with const you might also need to cast function pointer(s). [constParameterCallback] readline-3.3/C-readline.c:199:41: note: You might need to cast the function pointer here readline-3.3/C-readline.c:177:47: note: Parameter 'line' can be declared as pointer to const readline-3.3/C-readline.c:204:44: style: Parameter 'L' can be declared as pointer to const. However it seems that 'c_callback_read_char' is a callback function, if 'L' is declared with const you might also need to cast function pointer(s). [constParameterCallback] readline-3.3/C-readline.c:332:31: note: You might need to cast the function pointer here readline-3.3/C-readline.c:204:44: note: Parameter 'L' can be declared as pointer to const readline-3.3/C-readline.c:297:47: style: Parameter 'L' can be declared as pointer to const. However it seems that 'c_set_default_completer' is a callback function, if 'L' is declared with const you might also need to cast function pointer(s). [constParameterCallback] readline-3.3/C-readline.c:341:39: note: You might need to cast the function pointer here readline-3.3/C-readline.c:297:47: note: Parameter 'L' can be declared as pointer to const readline-3.3/C-readline.c:75:6: warning: Uninitialized variable: tty_stream [uninitvar] readline-3.3/C-readline.c:55:13: note: Assuming condition is false readline-3.3/C-readline.c:75:6: note: Uninitialized variable: tty_stream diff: DONE