1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00

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.
This commit is contained in:
Anuradha Weeraman 2020-06-20 20:47:11 -04:00 committed by GitHub
parent 9d428f8f5e
commit de2b4a6f97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)