From e2135dbaa5b444ba288f0b0cb047ae94e9767825 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 22 Sep 2013 02:38:17 +0200 Subject: [PATCH] pn53x-sam: fix truncated stdio return value Problem reported by Coverity: CID 1090318 (#1 of 1): Truncated stdio return value (CHAR_IO) char_io: Assigning the return value of "getchar(void)" to char "input" truncates its value --- examples/pn53x-sam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pn53x-sam.c b/examples/pn53x-sam.c index 79ec682..b53f041 100644 --- a/examples/pn53x-sam.c +++ b/examples/pn53x-sam.c @@ -114,7 +114,7 @@ main(int argc, const char *argv[]) printf(">> "); // Take user's choice - char input = getchar(); + int input = getchar(); printf("\n"); if ((input < '1') || (input > '3')) { ERR("%s", "Invalid selection.");