Fix Error: keyboard_main.c:420:15: error: result of comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
if (key != EOF) ~~~ ^ ~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
d52a8298ce
commit
1c23a095ea
@ -372,7 +372,7 @@ int main(int argc, FAR char *argv[])
|
||||
{
|
||||
int i;
|
||||
int ret;
|
||||
char key;
|
||||
int key;
|
||||
bool running = true;
|
||||
pthread_t pid;
|
||||
struct app_options appopt;
|
||||
@ -416,7 +416,7 @@ int main(int argc, FAR char *argv[])
|
||||
|
||||
while (running)
|
||||
{
|
||||
key = (char)getchar();
|
||||
key = getchar();
|
||||
if (key != EOF)
|
||||
{
|
||||
switch (key)
|
||||
|
@ -502,7 +502,7 @@ int main(int argc, FAR char *argv[])
|
||||
{
|
||||
int i;
|
||||
int ret;
|
||||
char key;
|
||||
int key;
|
||||
bool running = true;
|
||||
pthread_t pid;
|
||||
struct app_options appopt;
|
||||
@ -542,7 +542,7 @@ int main(int argc, FAR char *argv[])
|
||||
|
||||
while (running)
|
||||
{
|
||||
key = (char)getchar();
|
||||
key = getchar();
|
||||
if (key != EOF)
|
||||
{
|
||||
switch (key)
|
||||
|
Loading…
Reference in New Issue
Block a user