This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[patch/5] Fix CC warnings (and two real bugs)
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [patch/5] Fix CC warnings (and two real bugs)
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 15 May 2000 11:43:06 +1000
- Organization: Cygnus Solutions
FYI,
I've checked in the attatched which purges a few CC warnings. In the
case of ui-out.c the functions were returning uninitialized variables.
Andrew
Mon May 15 11:23:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
* proc-events.c (init_syscall_table): Delete stray ``;''.
* ui-out.c (ui_out_set_flags, ui_out_clear_flags): Return old
value.
* mdebugread.c (START_PSYMTAB): Add paren to avoid x=x=x.
Index: mdebugread.c
===================================================================
RCS file: /cvs/src/src/gdb/mdebugread.c,v
retrieving revision 1.1.1.5
diff -p -r1.1.1.5 mdebugread.c
*** mdebugread.c 1999/09/08 23:59:21 1.1.1.5
--- mdebugread.c 2000/05/15 01:36:45
*************** parse_partial_symbols (objfile)
*** 2767,2773 ****
#define CUR_SYMBOL_TYPE type_code
#define CUR_SYMBOL_VALUE sh.value
#define START_PSYMTAB(ofile,fname,low,symoff,global_syms,static_syms)\
! pst = save_pst
#define END_PSYMTAB(pst,ilist,ninc,c_off,c_text,dep_list,n_deps,textlow_not_set) (void)0
#define HANDLE_RBRAC(val) \
if ((val) > save_pst->texthigh) save_pst->texthigh = (val);
--- 2767,2773 ----
#define CUR_SYMBOL_TYPE type_code
#define CUR_SYMBOL_VALUE sh.value
#define START_PSYMTAB(ofile,fname,low,symoff,global_syms,static_syms)\
! (pst = save_pst)
#define END_PSYMTAB(pst,ilist,ninc,c_off,c_text,dep_list,n_deps,textlow_not_set) (void)0
#define HANDLE_RBRAC(val) \
if ((val) > save_pst->texthigh) save_pst->texthigh = (val);
Index: proc-events.c
===================================================================
RCS file: /cvs/src/src/gdb/proc-events.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 proc-events.c
*** proc-events.c 2000/01/25 02:39:49 1.1.1.1
--- proc-events.c 2000/05/15 01:36:45
*************** init_syscall_table (void)
*** 1389,1395 ****
#if defined (SYS_yield)
syscall_table[SYS_yield] = "yield";
#endif
! };
/*
* Prettyprint a single syscall by number.
--- 1389,1395 ----
#if defined (SYS_yield)
syscall_table[SYS_yield] = "yield";
#endif
! }
/*
* Prettyprint a single syscall by number.
Index: ui-out.c
===================================================================
RCS file: /cvs/src/src/gdb/ui-out.c,v
retrieving revision 1.2
diff -p -r1.2 ui-out.c
*** ui-out.c 2000/02/17 20:08:48 1.2
--- ui-out.c 2000/05/15 01:36:45
*************** ui_out_set_flags (uiout, mask)
*** 490,496 ****
struct ui_out *uiout;
int mask;
{
! int oldflags;
uiout->flags |= mask;
--- 490,496 ----
struct ui_out *uiout;
int mask;
{
! int oldflags = uiout->flags;
uiout->flags |= mask;
*************** ui_out_clear_flags (uiout, mask)
*** 503,509 ****
struct ui_out *uiout;
int mask;
{
! int oldflags;
uiout->flags &= ~mask;
--- 503,509 ----
struct ui_out *uiout;
int mask;
{
! int oldflags = uiout->flags;
uiout->flags &= ~mask;