#984619 keymap.c: fix an error the compiler reported

Package:
src:nn
Source:
nn
Submitter:
Bjarni Ingi Gislason
Date:
2021-03-05 22:03:03 UTC
Severity:
normal
Tags:
#984619#5
Date:
2021-03-05 21:58:45 UTC
From:
To:
Dear Maintainer,

keymap.c: In function 'key_name':
keymap.c:833:33: error: 'uint' undeclared (first use in this function); did you mean 'int'?
  833 |  snprintf(buf, NBUF, "0x%02x", (uint)c);
      |                                 ^~~~
      |                                 int
keymap.c:833:33: note: each undeclared identifier is reported only once for each function it appears in
keymap.c:833:38: error: expected ')' before 'c'
  833 |  snprintf(buf, NBUF, "0x%02x", (uint)c);
      |                                      ^
      |                                      )

####

  Change "uint" to "unsigned int".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 keymap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/keymap.c b/keymap.c
index fee9bbf..1cb0011 100644
--- a/keymap.c
+++ b/keymap.c
@@ -830,7 +830,7 @@ key_name(key_type c)
 	goto out;
     }
     if (data_bits < 8 && c >= NORMAL_KEYS) {
-	snprintf(buf, NBUF, "0x%02x", (uint)c);
+	snprintf(buf, NBUF, "0x%02x", (unsigned int) c);
 	goto out;
     }
     buf[0] = c;