diff options
author | Jason Molenda <jmolenda@apple.com> | 1998-10-16 21:45:06 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1998-10-16 21:45:06 +0000 |
commit | 24418cfbac29d947c943d05c14a00e918cff79d7 (patch) | |
tree | 106392351866526f20e7f89c5a03d89f32aa9984 /gdb/gdbtypes.c | |
parent | 2b6f11fa0b8305e5086d496d8cd4d39c28b8a2df (diff) | |
download | gdb-24418cfbac29d947c943d05c14a00e918cff79d7.zip gdb-24418cfbac29d947c943d05c14a00e918cff79d7.tar.gz gdb-24418cfbac29d947c943d05c14a00e918cff79d7.tar.bz2 |
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.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index d55a87a..6601d9d 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1,5 +1,5 @@ /* Support routines for manipulating internal types for GDB. - Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. Contributed by Cygnus Support, using pieces from other GDB modules. This file is part of GDB. @@ -78,6 +78,8 @@ static void print_arg_types PARAMS ((struct type **, int)); static void dump_fn_fieldlists PARAMS ((struct type *, int)); static void print_cplus_stuff PARAMS ((struct type *, int)); +void _initialize_gdbtypes PARAMS ((void)); + /* Alloc a new type structure and fill it with some defaults. If OBJFILE is non-NULL, then allocate the space for the type structure in that objfile's type_obstack. */ @@ -127,13 +129,15 @@ make_pointer_type (type, typeptr) ntype = TYPE_POINTER_TYPE (type); if (ntype) - if (typeptr == 0) - return ntype; /* Don't care about alloc, and have new type. */ - else if (*typeptr == 0) - { - *typeptr = ntype; /* Tracking alloc, and we have new type. */ - return ntype; - } + { + if (typeptr == 0) + return ntype; /* Don't care about alloc, and have new type. */ + else if (*typeptr == 0) + { + *typeptr = ntype; /* Tracking alloc, and we have new type. */ + return ntype; + } + } if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */ { @@ -192,13 +196,15 @@ make_reference_type (type, typeptr) ntype = TYPE_REFERENCE_TYPE (type); if (ntype) - if (typeptr == 0) - return ntype; /* Don't care about alloc, and have new type. */ - else if (*typeptr == 0) - { - *typeptr = ntype; /* Tracking alloc, and we have new type. */ - return ntype; - } + { + if (typeptr == 0) + return ntype; /* Don't care about alloc, and have new type. */ + else if (*typeptr == 0) + { + *typeptr = ntype; /* Tracking alloc, and we have new type. */ + return ntype; + } + } if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */ { |