From e7bf1152a956221469c18da38ccd4e623cafd198 Mon Sep 17 00:00:00 2001 From: "K. Richard Pixley" Date: Wed, 8 Sep 1993 21:04:59 +0000 Subject: [PATCH] gcc lint --- gdb/ChangeLog | 5 +++++ gdb/gdbtypes.c | 13 +++++++------ gdb/mipsread.c | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 276df6b539b..3fec54f4792 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,11 @@ Wed Sep 8 13:01:10 1993 K. Richard Pixley (rich@cygnus.com) Gcc lint. + * infrun.c (wait_for_inferior): initialize stop_sp, prologue_pc. + remove symtab, appears unused. + (restore_selected_frame): return 1. + * mipsread.c (psymtab_to_symtab_1): initialize first_off. + (fixup_sigtramp): initialize b0. * printcmd.c (do_examine): initialize val_type. (print_frame_args): initialize b. * ser-tcp.c (tcp_restore): comment out declaration. Appears diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index cdd7343608e..c6e41f349e1 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -684,9 +684,6 @@ lookup_struct_elt_type (type, name, noerr) int noerr; { int i; -#if 0 - char *typename; -#endif if (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_CODE (type) == TYPE_CODE_REF) @@ -709,9 +706,13 @@ lookup_struct_elt_type (type, name, noerr) the structure tag name is the same as the member name. I.E. when doing "ptype bell->bar" for "struct foo { int bar; int foo; } bell;" Disabled by fnf. */ - typename = type_name_no_tag (type); - if (typename != NULL && STREQ (typename, name)) - return type; + { + char *typename; + + typename = type_name_no_tag (type); + if (typename != NULL && STREQ (typename, name)) + return type; + } #endif for (i = TYPE_NFIELDS (type) - 1; i >= TYPE_N_BASECLASSES (type); i--) diff --git a/gdb/mipsread.c b/gdb/mipsread.c index d1228ea237f..608814de266 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -2564,7 +2564,7 @@ psymtab_to_symtab_1 (pst, filename) char *pdr_ptr; char *pdr_end; int first_pdr; - unsigned long first_off; + unsigned long first_off = 0; /* This symbol table contains stabs-in-ecoff entries. */ @@ -3305,7 +3305,7 @@ fixup_sigtramp () { struct symbol *s; struct symtab *st; - struct block *b, *b0; + struct block *b, *b0 = NULL; sigtramp_address = -1; -- 2.30.2