#985181 term.c: cast "lbuf" to "char *" in "CALL(completion) ()"

Package:
src:nn
Source:
nn
Submitter:
Bjarni Ingi Gislason
Date:
2021-03-14 00:57:06 UTC
Severity:
normal
Tags:
#985181#5
Date:
2021-03-14 00:55:08 UTC
From:
To:
Dear Maintainer,

term.c:1932:26: warning: pointer targets in passing argument 1 of 'completion' differ in signedness [-Wpointer-sign]
 1932 |   if (!CALL(completion) (lbuf, -(i + 1)) && did_help)
      |                          ^~~~
      |                          |
      |                          key_type * {aka unsigned char *}
term.c:1932:26: note: expected 'char *' but argument is of type 'key_type *' {aka 'unsigned char *'}

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 term.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/term.c b/term.c
index b756644..670f542 100644
--- a/term.c
+++ b/term.c
@@ -1929,7 +1929,7 @@ kill_prefill_hack:
 			tputc(BS);
 		    clrline();
 		}
-		if (!CALL(completion) (lbuf, -(i + 1)) && did_help)
+		if (!CALL(completion) ((char *) lbuf, -(i + 1)) && did_help)
 		    clrmsg(i);
 		did_help = 0;
 		comp_len = comp_used = 0;
@@ -1941,7 +1941,7 @@ kill_prefill_hack:
 		if (!comp_used || c == comp2_key ||
 		    (c == help_key && lastc != c)) {
 		    lbuf[i] = NUL;
-		    if ((comp_used = CALL(completion) (lbuf, i)) == 0) {
+		    if ((comp_used = CALL(completion) ((char *) lbuf, i)) == 0) {
 			ding();
 			continue;
 		    }
@@ -1993,7 +1993,7 @@ kill_prefill_hack:
 		}
 	    }
 	    if (comp_used) {
-		if (!CALL(completion) (lbuf, -(i + 1)) && did_help)
+		if (!CALL(completion) ((char *) lbuf, -(i + 1)) && did_help)
 		    clrmsg(i);
 		did_help = 0;
 		comp_len = comp_used = 0;