forked from Imagelibrary/binutils-gdb
1998-10-16 Jason Molenda (jsm@bugshack.cygnus.com)
* command.c copying.c copying.awk core-aout.c core-regset.c
corelow.c dcache.c i386-tdep.c i386v4-nat.c i387-tdep.c
infcmd.c infptrace.c infrun.c remote.c solib.c symfile.c
symmisc.c valarith.c: Add prototypes.
* defs.h: Add prototype for utils.c::do_run_cleanups.
* gdbtypes.c: Add prototypes.
(make_pointer_type): Add braces to remove nested if-else ambiguity.
(make_reference_type): Ditto.
* printcmd.c (printf_command): Initialize 'f' and 'string' at
function startup to suppress possibly-used-before-initialized warning.
* remote-utils.c: Add prototypes.
(sr_pollchar): Add braces to remove nested if-else ambiguity.
* ser-tcp.c: Add prototypes.
(wait_for): Add braces to remove nested if-else ambiguity.
(tcp_readchar): Ditto.
* ser-unix.c: Add prototypes.
(get_tty_state): Don't define errno here.
(get_tty_state): Don't define errno here.
(hardwire_readchar): Only define 't' if we are compiling in a Cygwin
environment.
* symtab.c: Add prototypes.
(find_methods): Add braces to remove nested if-else ambiguity.
(search_symbols): Set 'i' to an initial value to suppress a
possibly-used-before-initialized warning.
* valops.c: Add prototypes.
(value_cast): Set 'eltype2' to an initial value to suppress a
possibly-used-before-initialized warning.
(value_of_variable): Add braces to remove nested if-else ambiguity.
(value_of_this): Ditto.
* valprint.c: Add prototypes.
(print_floating): Add braces to remove nested if-else ambiguity.
Looks like a big change, but it is really just a lot of small stuff.
In the cases where GCC was flagging a possible use-before-initialized
warning on variables, it turned out that these were being used properly
but GCC couldn't see that.
This commit is contained in:
@@ -83,6 +83,8 @@ static int hardwire_flush_input PARAMS ((serial_t));
|
||||
static int hardwire_send_break PARAMS ((serial_t));
|
||||
static int hardwire_setstopbits PARAMS ((serial_t, int));
|
||||
|
||||
void _initialize_ser_hardwire PARAMS ((void));
|
||||
|
||||
#ifdef __CYGWIN32__
|
||||
extern void (*ui_loop_hook) PARAMS ((int));
|
||||
#endif
|
||||
@@ -102,13 +104,11 @@ hardwire_open(scb, name)
|
||||
}
|
||||
|
||||
static int
|
||||
get_tty_state(scb, state)
|
||||
get_tty_state (scb, state)
|
||||
serial_t scb;
|
||||
struct hardwire_ttystate *state;
|
||||
{
|
||||
#ifdef HAVE_TERMIOS
|
||||
extern int errno;
|
||||
|
||||
if (tcgetattr(scb->fd, &state->termios) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -546,11 +546,14 @@ wait_for(scb, timeout)
|
||||
char if successful. Returns SERIAL_TIMEOUT if timeout expired, EOF if line
|
||||
dropped dead, or SERIAL_ERROR for any other error (see errno in that case). */
|
||||
static int
|
||||
hardwire_readchar(scb, timeout)
|
||||
hardwire_readchar (scb, timeout)
|
||||
serial_t scb;
|
||||
int timeout;
|
||||
{
|
||||
int status, t;
|
||||
int status;
|
||||
#ifdef __CYGWIN32__
|
||||
int t;
|
||||
#endif
|
||||
|
||||
if (scb->bufcnt-- > 0)
|
||||
return *scb->bufp++;
|
||||
|
||||
Reference in New Issue
Block a user