From de2b4a6f975c753f63f38fa5bbf095e9e4f4780e Mon Sep 17 00:00:00 2001 From: Anuradha Weeraman Date: Sat, 20 Jun 2020 20:47:11 -0400 Subject: [PATCH] edit/edit.c: fix compiler warnings (#31) This fixes compiler warnings for implicit-ints: warning: return type defaults to 'int' [-Wimplicit-int] 1854: sh_tcgetattr(int fd, struct termios *tty) 1863: sh_tcsetattr(int fd, int cmd, struct termios *tty) cmd/ksh93/edit/edit.c: - Set the return type explicitly to int and align with the prototype declared in include/terminal.h. --- src/cmd/ksh93/edit/edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/ksh93/edit/edit.c b/src/cmd/ksh93/edit/edit.c index 12b081572..705db4e43 100644 --- a/src/cmd/ksh93/edit/edit.c +++ b/src/cmd/ksh93/edit/edit.c @@ -1851,7 +1851,7 @@ int sh_ioctl(int fd, int cmd, void* val, int sz) #ifdef _lib_tcgetattr # undef tcgetattr - sh_tcgetattr(int fd, struct termios *tty) +int sh_tcgetattr(int fd, struct termios *tty) { int r,err = errno; while((r=tcgetattr(fd,tty)) < 0 && errno==EINTR) @@ -1860,7 +1860,7 @@ int sh_ioctl(int fd, int cmd, void* val, int sz) } # undef tcsetattr - sh_tcsetattr(int fd, int cmd, struct termios *tty) +int sh_tcsetattr(int fd, int cmd, struct termios *tty) { int r,err = errno; while((r=tcsetattr(fd,cmd,tty)) < 0 && errno==EINTR)