From 0ac0a9f6f14269d2a69c804a8194cc2f7009ab3b Mon Sep 17 00:00:00 2001 From: "K. Richard Pixley" Date: Wed, 8 Sep 1993 20:57:08 +0000 Subject: [PATCH] gcc lint --- gdb/ChangeLog | 12 ++++++++++++ gdb/ser-tcp.c | 2 +- gdb/ser-unix.c | 9 ++++----- gdb/serial.h | 4 ++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2ac2c9f4486..276df6b539b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,18 @@ Wed Sep 8 13:01:10 1993 K. Richard Pixley (rich@cygnus.com) Gcc lint. + * printcmd.c (do_examine): initialize val_type. + (print_frame_args): initialize b. + * ser-tcp.c (tcp_restore): comment out declaration. Appears + unused. + * ser-unix.c (hardwire_restore): comment out declaration. Appears + unused. + (hardwire_send_break): moved variable status into ifdef + HAVE_SGTTY. + (wait_for): moved variable numfds into ifdef HAVE_SGTTY. + * serial.h: comment change only. + * stabsread.c (rs6000_builtin_type): initialize rettype. + (read_range_type): initialize nbits. * stack.c (print_frame_info): remove unused variable numargs. (parse_frame_specification): remove unused variables arg1, arg2, arg3. diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index f492bc13ccd..6688628bdad 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -39,7 +39,7 @@ static int wait_for PARAMS ((serial_t scb, int timeout)); static int tcp_readchar PARAMS ((serial_t scb, int timeout)); static int tcp_setbaudrate PARAMS ((serial_t scb, int rate)); static int tcp_write PARAMS ((serial_t scb, const char *str, int len)); -static void tcp_restore PARAMS ((serial_t scb)); +/* FIXME: static void tcp_restore PARAMS ((serial_t scb)); */ static void tcp_close PARAMS ((serial_t scb)); static serial_ttystate tcp_get_tty_state PARAMS ((serial_t scb)); static int tcp_set_tty_state PARAMS ((serial_t scb, serial_ttystate state)); diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index b9db6c1b243..c39663f7680 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -82,7 +82,7 @@ static int hardwire_readchar PARAMS ((serial_t scb, int timeout)); static int rate_to_code PARAMS ((int rate)); static int hardwire_setbaudrate PARAMS ((serial_t scb, int rate)); static int hardwire_write PARAMS ((serial_t scb, const char *str, int len)); -static void hardwire_restore PARAMS ((serial_t scb)); +/* FIXME: static void hardwire_restore PARAMS ((serial_t scb)); */ static void hardwire_close PARAMS ((serial_t scb)); static int get_tty_state PARAMS ((serial_t scb, struct hardwire_ttystate *state)); static int set_tty_state PARAMS ((serial_t scb, struct hardwire_ttystate *state)); @@ -358,8 +358,6 @@ static int hardwire_send_break (scb) serial_t scb; { - int status; - #ifdef HAVE_TERMIOS return tcsendbreak (scb->fd, 0); #endif @@ -370,6 +368,7 @@ hardwire_send_break (scb) #ifdef HAVE_SGTTY { + int status; struct timeval timeout; status = ioctl (scb->fd, TIOCSBRK, 0); @@ -438,8 +437,6 @@ wait_for(scb, timeout) serial_t scb; int timeout; { - int numfds; - #ifdef HAVE_SGTTY struct timeval tv; fd_set readfds; @@ -453,6 +450,8 @@ wait_for(scb, timeout) while (1) { + int numfds; + if (timeout >= 0) numfds = select(scb->fd+1, &readfds, 0, 0, &tv); else diff --git a/gdb/serial.h b/gdb/serial.h index 808aad213c7..84916d32306 100644 --- a/gdb/serial.h +++ b/gdb/serial.h @@ -132,8 +132,8 @@ serial_t serial_fdopen PARAMS ((int fd)); #define SERIAL_SETBAUDRATE(SERIAL_T, RATE) ((SERIAL_T)->ops->setbaudrate((SERIAL_T), RATE)) -/* Write LEN chars from STRING to the port SERIAL_T. Returns 0 for success, - -1 for failure. */ +/* Write LEN chars from STRING to the port SERIAL_T. Returns 0 for + success, non-zero for failure. */ #define SERIAL_WRITE(SERIAL_T, STRING, LEN) ((SERIAL_T)->ops->write((SERIAL_T), STRING, LEN)) -- 2.30.2