From b2e951ec58973b911515b0770ef859cf9b779533 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 14 Oct 2013 09:15:09 +0000 Subject: * gen-aout.c (main): Fix formatting. Close file. * emultempl/aix.em (_read_file): Close file at end of function. * gas/all/itbl-test.c (main): Close fas. * read.c (add_include_dir): Use xrealloc. * config/tc-score.c (do_macro_bcmp): Initialise inst_main. * config/tc-tic6x.c (tic6x_parse_operand): Initialise second_reg. * readelf.c (decode_arm_unwind): Initialise addr structure. (process_symbol_table): Free lengths. * srcconv.c (wr_sc): Free info. * chew.c (perform): Free next. --- gas/ChangeLog | 6 ++++++ gas/config/tc-score.c | 2 +- gas/config/tc-tic6x.c | 2 +- gas/read.c | 8 +++----- gas/testsuite/ChangeLog | 4 ++++ gas/testsuite/gas/all/itbl-test.c | 3 ++- 6 files changed, 17 insertions(+), 8 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index ccc6f04..5d9cc80 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2013-10-14 Nick Clifton + + * read.c (add_include_dir): Use xrealloc. + * config/tc-score.c (do_macro_bcmp): Initialise inst_main. + * config/tc-tic6x.c (tic6x_parse_operand): Initialise second_reg. + 2013-10-13 Sandra Loosemore * config/tc-nios2.c (nios2_consume_arg): Make the "ba" warning diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c index 822b9cf..2bb3fbe 100644 --- a/gas/config/tc-score.c +++ b/gas/config/tc-score.c @@ -4489,7 +4489,7 @@ s3_do_macro_bcmp (char *str) char* ptemp; int i = 0; struct s3_score_it inst_expand[2]; - struct s3_score_it inst_main; + struct s3_score_it inst_main = { 0 }; memset (inst_expand, 0, sizeof inst_expand); s3_skip_whitespace (str); diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c index 81f33f4..fda9cd3 100644 --- a/gas/config/tc-tic6x.c +++ b/gas/config/tc-tic6x.c @@ -1596,7 +1596,7 @@ tic6x_parse_operand (char **p, tic6x_operand *op, unsigned int op_forms, /* See if this looks like a register or register pair. */ if (!operand_parsed && (op_forms & (TIC6X_OP_REG | TIC6X_OP_REGPAIR))) { - tic6x_register first_reg, second_reg; + tic6x_register first_reg, second_reg = { 0 }; bfd_boolean reg_ok; char *rq = q; diff --git a/gas/read.c b/gas/read.c index 082670c..02f5a25 100644 --- a/gas/read.c +++ b/gas/read.c @@ -1,7 +1,5 @@ /* read.c - read a source file - - Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010, 2011, 2012 Free Software Foundation, Inc. + Copyright 1986-2013 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -5794,8 +5792,8 @@ add_include_dir (char *path) { include_dir_count++; include_dirs = - (char **) realloc (include_dirs, - include_dir_count * sizeof (*include_dirs)); + (char **) xrealloc (include_dirs, + include_dir_count * sizeof (*include_dirs)); } include_dirs[include_dir_count - 1] = path; /* New one. */ diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 5513867..9100e4b 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-10-14 Nick Clifton + + * gas/all/itbl-test.c (main): Close fas. + 2013-10-13 Sandra Loosemore * gas/nios2/warn_nobreak.l: Update text of warning messages. diff --git a/gas/testsuite/gas/all/itbl-test.c b/gas/testsuite/gas/all/itbl-test.c index 38fcfc5..c00ff1a 100644 --- a/gas/testsuite/gas/all/itbl-test.c +++ b/gas/testsuite/gas/all/itbl-test.c @@ -1,6 +1,6 @@ /* itbl-test.c - Copyright (C) 1997, 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 1997-2013 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -97,6 +97,7 @@ main (int argc, char **argv) test_reg (3, e_creg, "c2", 22); test_reg (3, e_dreg, "d3", 3); + fclose (fas); return 0; } -- cgit v1.1