From bfd818fbd333339de45fb84f896557f91cfcea61 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sun, 29 Sep 2024 23:00:00 +0100 Subject: [PATCH] textio/txInput.c non-void function does not return a value This function is related to libreadline rl_pre_input_hook callback which is invoked as (not making use of any function return value): readline.c: (*rl_pre_input_hook) (); The general prototype for this function is: rltypedefs.h:typedef int rl_hook_func_t PARAMS((void)); So the resolution is to provide a known value as the return value, which resolves the concern. SonarCloud textio/txInput.c:550 non-void function does not return a value https://sonarcloud.io/project/issues?open=AZJB17NwNGfDNup0Rj5G&id=dlmiles_magic --- textio/txInput.c | 1 + 1 file changed, 1 insertion(+) diff --git a/textio/txInput.c b/textio/txInput.c index e8756c5c..7a22eafb 100644 --- a/textio/txInput.c +++ b/textio/txInput.c @@ -547,6 +547,7 @@ TxPrefix(void) if (_rl_prefix != NULL) rl_insert_text(_rl_prefix); rl_redisplay(); + return 0; } /*