Browse Source

drop (char*) cast in the third argument of ioctl()

rlar 14 years ago
parent
commit
cc7afb7abb
  1. 4
      ChangeLog
  2. 14
      src/frontend/parser/complete.c

4
ChangeLog

@ -1,3 +1,7 @@
2012-02-06 Robert Larice
* src/frontend/parser/complete.c :
drop (char*) cast in the third argument of ioctl()
2012-02-06 Robert Larice 2012-02-06 Robert Larice
* src/frontend/outitf.c , * src/frontend/outitf.c ,
* src/frontend/spiceif.c , * src/frontend/spiceif.c ,

14
src/frontend/parser/complete.c

@ -398,16 +398,16 @@ cp_ccon(bool on)
* make sure we aren't in raw or cbreak mode. Hope the (void) * make sure we aren't in raw or cbreak mode. Hope the (void)
* ioctl's won't fail. * ioctl's won't fail.
*/ */
(void) ioctl(fileno(cp_in), TIOCGETC, (char *) &tbuf);
(void) ioctl(fileno(cp_in), TIOCGETC, &tbuf);
if (on) if (on)
tbuf.t_brkc = ESCAPE; tbuf.t_brkc = ESCAPE;
else else
tbuf.t_brkc = '\0'; tbuf.t_brkc = '\0';
(void) ioctl(fileno(cp_in), TIOCSETC, (char *) &tbuf);
(void) ioctl(fileno(cp_in), TIOCSETC, &tbuf);
(void) ioctl(fileno(cp_in), TIOCGETP, (char *) &sbuf);
(void) ioctl(fileno(cp_in), TIOCGETP, &sbuf);
sbuf.sg_flags &= ~(RAW|CBREAK); sbuf.sg_flags &= ~(RAW|CBREAK);
(void) ioctl(fileno(cp_in), TIOCSETP, (char *) &sbuf);
(void) ioctl(fileno(cp_in), TIOCSETP, &sbuf);
#else #else
# ifdef HAVE_TERMIO_H # ifdef HAVE_TERMIO_H
@ -440,7 +440,7 @@ cp_ccon(bool on)
#if HAVE_TCGETATTR #if HAVE_TCGETATTR
tcgetattr(fileno(cp_in),&OS_Buf); tcgetattr(fileno(cp_in),&OS_Buf);
#else #else
(void) ioctl(fileno(cp_in), TERM_GET, (char *) &OS_Buf);
(void) ioctl(fileno(cp_in), TERM_GET, &OS_Buf);
#endif #endif
sbuf = OS_Buf; sbuf = OS_Buf;
sbuf.c_cc[VEOF] = 0; sbuf.c_cc[VEOF] = 0;
@ -449,13 +449,13 @@ cp_ccon(bool on)
#if HAVE_TCSETATTR #if HAVE_TCSETATTR
tcsetattr(fileno(cp_in),TCSANOW,&sbuf); tcsetattr(fileno(cp_in),TCSANOW,&sbuf);
#else #else
(void) ioctl(fileno(cp_in), TERM_SET, (char *) &sbuf);
(void) ioctl(fileno(cp_in), TERM_SET, &sbuf);
#endif #endif
} else { } else {
#ifdef HAVE_TCSETATTR #ifdef HAVE_TCSETATTR
tcsetattr(fileno(cp_in),TCSANOW,&OS_Buf); tcsetattr(fileno(cp_in),TCSANOW,&OS_Buf);
#else #else
(void) ioctl(fileno(cp_in), TERM_SET, (char *) &OS_Buf);
(void) ioctl(fileno(cp_in), TERM_SET, &OS_Buf);
#endif #endif
} }

Loading…
Cancel
Save