This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: Fixes for gas/itbl-* sources


Hi Guys,

  I ran across a few compile time warnings building gas for the
  mips64vrel-elf toolchain today, so I am checking in the patch below
  to fix them.

Cheers
  Nick

gas/ChangeLog
2007-03-29  Nick Clifton  <nickc@redhat.com>

	* itbl-ops.c (itbl_entry): Remove unnecessary and excessively long
	initialization.
	* itbl-ops.h (enum e_processor): Initialise the e_nprocs field
	using ITBL_NUMBER_OF_PROCESSORS.
	* itbl-parse.y (yyerror): Remove use of redundant macro PARAMS.

Index: gas/itbl-ops.c
===================================================================
RCS file: /cvs/src/src/gas/itbl-ops.c,v
retrieving revision 1.17
diff -c -3 -p -r1.17 itbl-ops.c
*** gas/itbl-ops.c	7 Jun 2006 11:27:57 -0000	1.17
--- gas/itbl-ops.c	29 Mar 2007 07:22:43 -0000
*************** struct itbl_entry {
*** 145,156 ****
  
  static int itbl_num_opcodes = 0;
  /* Array of entries for each processor and entry type */
! static struct itbl_entry *entries[e_nprocs][e_ntypes] = {
!   {0, 0, 0, 0, 0, 0},
!   {0, 0, 0, 0, 0, 0},
!   {0, 0, 0, 0, 0, 0},
!   {0, 0, 0, 0, 0, 0}
! };
  
  /* local prototypes */
  static unsigned long build_opcode (struct itbl_entry *e);
--- 145,151 ----
  
  static int itbl_num_opcodes = 0;
  /* Array of entries for each processor and entry type */
! static struct itbl_entry *entries[e_nprocs][e_ntypes];
  
  /* local prototypes */
  static unsigned long build_opcode (struct itbl_entry *e);
Index: gas/itbl-ops.h
===================================================================
RCS file: /cvs/src/src/gas/itbl-ops.h,v
retrieving revision 1.8
diff -c -3 -p -r1.8 itbl-ops.h
*** gas/itbl-ops.h	7 Jun 2006 11:27:57 -0000	1.8
--- gas/itbl-ops.h	29 Mar 2007 07:22:43 -0000
*************** typedef enum
*** 69,75 ****
  typedef enum
    {
      e_p0,
!     e_nprocs = NUMBER_OF_PROCESSORS,
      e_invproc			/* invalid processor */
    } e_processor;
  
--- 69,75 ----
  typedef enum
    {
      e_p0,
!     e_nprocs = ITBL_NUMBER_OF_PROCESSORS,
      e_invproc			/* invalid processor */
    } e_processor;
  
Index: gas/itbl-parse.y
===================================================================
RCS file: /cvs/src/src/gas/itbl-parse.y,v
retrieving revision 1.7
diff -c -3 -p -r1.7 itbl-parse.y
*** gas/itbl-parse.y	7 Jun 2006 11:27:57 -0000	1.7
--- gas/itbl-parse.y	29 Mar 2007 07:22:43 -0000
*************** FIXME! hex is ambiguous with any digit
*** 274,280 ****
  
  static int sbit, ebit;
  static struct itbl_entry *insn=0;
! static int yyerror PARAMS ((const char *));
  
  %}
  
--- 274,280 ----
  
  static int sbit, ebit;
  static struct itbl_entry *insn=0;
! static int yyerror (const char *);
  
  %}
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]