Skip to content

Commit

Permalink
edit/edit.c: fix compiler warnings (att#31)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aweeraman authored Jun 21, 2020
1 parent 9d428f8 commit de2b4a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/ksh93/edit/edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit de2b4a6

Please sign in to comment.