This is the mail archive of the binutils@sources.redhat.com 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] : coff-or32.c warnings


Alan Modra wrote:
> 
> /src/binutils-current/bfd/coff-or32.c:74: warning: function declaration isn't a prototype
> /src/binutils-current/bfd/coff-or32.c:252: warning: missing initializer
> /src/binutils-current/bfd/coff-or32.c:252: warning: (near initialization for `howto_table[1].rightshift')
> 
> Please fix.
> 
> --
> Alan Modra
> IBM OzLabs - Linux Technology Centre

Fixed!

Also fixed some other warnings, and diff also caught a line missing in
bfd/configure.tgt. Everything is in this pathc.

regards,
	Ivan
Index: bfd/coff-or32.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-or32.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 coff-or32.c
*** coff-or32.c	2002/01/31 17:32:54	1.1
--- coff-or32.c	2002/02/04 15:52:49
***************
*** 28,36 ****
  #include "libcoff.h"
  
  static long                   get_symbol_value           PARAMS ((asymbol *));
! static bfd_reloc_status_type  or1_reloc                  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
! static boolean                coff_or1_relocate_section  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **));
! static boolean                coff_or1_adjust_symndx     PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, struct internal_reloc *, boolean *));
  
  #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
  
--- 28,37 ----
  #include "libcoff.h"
  
  static long                   get_symbol_value           PARAMS ((asymbol *));
! static bfd_reloc_status_type  or32_reloc                 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
! static boolean                coff_or32_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **));
! static boolean                coff_or32_adjust_symndx    PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, struct internal_reloc *, boolean *));
! static void                   reloc_processing           PARAMS ((     arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
  
  #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
  
*************** or32_reloc (abfd, reloc_entry, symbol_in
*** 245,257 ****
                        src_mask
  */
  
- /* FIXME: I'm not real sure about this table.  */
  static reloc_howto_type howto_table[] = 
  {
    { R_ABS,      0, 3, 32, false,  0, complain_overflow_bitfield,  or32_reloc, "ABS",     true, 0xffffffff,0xffffffff, false },
!   {1},  {2},  {3},   {4},  {5},  {6},  {7},  {8},  {9}, {10},
!   {11}, {12}, {13}, {14}, {15}, {16}, {17}, {18}, {19}, {20},
!   {21}, {22}, {23},
    { R_IREL,     0, 3, 32, true,   0, complain_overflow_signed,    or32_reloc, "IREL",    true, 0xffffffff,0xffffffff, false },
    { R_IABS,     0, 3, 32, false,  0, complain_overflow_bitfield,  or32_reloc, "IABS",    true, 0xffffffff,0xffffffff, false },
    { R_ILOHALF,  0, 3, 16, true,   0, complain_overflow_signed,    or32_reloc, "ILOHALF", true, 0x0000ffff,0x0000ffff, false },
--- 246,277 ----
                        src_mask
  */
  
  static reloc_howto_type howto_table[] = 
  {
    { R_ABS,      0, 3, 32, false,  0, complain_overflow_bitfield,  or32_reloc, "ABS",     true, 0xffffffff,0xffffffff, false },
!     EMPTY_HOWTO (1),
!     EMPTY_HOWTO (2),
!     EMPTY_HOWTO (3),
!     EMPTY_HOWTO (4),
!     EMPTY_HOWTO (5),
!     EMPTY_HOWTO (6),
!     EMPTY_HOWTO (7),
!     EMPTY_HOWTO (8),
!     EMPTY_HOWTO (9),
!     EMPTY_HOWTO (10),
!     EMPTY_HOWTO (11),
!     EMPTY_HOWTO (12),
!     EMPTY_HOWTO (13),
!     EMPTY_HOWTO (14),
!     EMPTY_HOWTO (15),
!     EMPTY_HOWTO (16),
!     EMPTY_HOWTO (17),
!     EMPTY_HOWTO (18),
!     EMPTY_HOWTO (19),
!     EMPTY_HOWTO (20),
!     EMPTY_HOWTO (21),
!     EMPTY_HOWTO (22),
!     EMPTY_HOWTO (23),
    { R_IREL,     0, 3, 32, true,   0, complain_overflow_signed,    or32_reloc, "IREL",    true, 0xffffffff,0xffffffff, false },
    { R_IABS,     0, 3, 32, false,  0, complain_overflow_bitfield,  or32_reloc, "IABS",    true, 0xffffffff,0xffffffff, false },
    { R_ILOHALF,  0, 3, 16, true,   0, complain_overflow_signed,    or32_reloc, "ILOHALF", true, 0x0000ffff,0x0000ffff, false },
*************** reloc_processing (relent,reloc, symbols,
*** 318,324 ****
  static boolean
  coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
                              contents, relocs, syms, sections)
!      bfd *output_bfd;
       struct bfd_link_info *info;
       bfd *input_bfd;
       asection *input_section;
--- 338,344 ----
  static boolean
  coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
                              contents, relocs, syms, sections)
!      bfd *output_bfd ATTRIBUTE_UNUSED;
       struct bfd_link_info *info;
       bfd *input_bfd;
       asection *input_section;
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.79
diff -c -3 -p -r1.79 configure.tgt
*** configure.tgt	2002/02/02 18:36:04	1.79
--- configure.tgt	2002/02/04 15:55:50
*************** ns32k-pc532-netbsd* | ns32k-pc532-lites*
*** 371,376 ****
--- 371,377 ----
  openrisc-*-*)		targ_emul=elf32openrisc ;;
  or32-*-coff)		targ_emul=or32 ;;
  or32-*-elf)		targ_emul=or32elf ;;
+ or32-*-rtems)           targ_emul=or32 ;;
  pdp11-*-*)		targ_emul=pdp11 ;;
  pjl*-*-*)	        targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
  pj*-*-*)	        targ_emul=pjelf ;;
Index: opcodes/or32-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/or32-dis.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 or32-dis.c
*** or32-dis.c	2002/01/31 17:33:08	1.1
--- or32-dis.c	2002/02/04 15:56:25
*************** or32_extract (param_ch, enc_initial, ins
*** 80,90 ****
    int param_pos = 0;
  
    for (enc = enc_initial; *enc != '\0'; enc++)
!     if (*enc == param_ch)
        if (enc - 2 >= enc_initial && (*(enc - 2) == '0') && (*(enc - 1) == 'x'))
  	continue;
        else
  	param_pos++;
  
  #if DEBUG
    printf ("or32_extract: %c %x ", param_ch, param_pos);
--- 80,91 ----
    int param_pos = 0;
  
    for (enc = enc_initial; *enc != '\0'; enc++)
!     if (*enc == param_ch) {
        if (enc - 2 >= enc_initial && (*(enc - 2) == '0') && (*(enc - 1) == 'x'))
  	continue;
        else
  	param_pos++;
+     }
  
  #if DEBUG
    printf ("or32_extract: %c %x ", param_ch, param_pos);
Index: opcodes/or32-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/or32-opc.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 or32-opc.c
*** or32-opc.c	2002/01/31 17:33:08	1.1
--- or32-opc.c	2002/02/04 15:56:25
*************** static void
*** 348,354 ****
  debug (int level, const char *format, ...)
  {
    /* Just to get rid of warnings.  */
!   format = level = 0;
  }
  #endif
  
--- 348,354 ----
  debug (int level, const char *format, ...)
  {
    /* Just to get rid of warnings.  */
!   format = (char*)level = 0;
  }
  #endif
  

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