This is the mail archive of the binutils@sourceware.cygnus.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]

Fix compile time warnings for dlltool.c


Hi Guys,

  I have checked in the patch below to fix the current compile time
  warnings when compiling dlltool.c.  This patch does not add any new
  features or fix any bugs.

Cheers
	Nick

1999-12-17  Nick Clifton  <nickc@cygnus.com>

	* dlltool.c (mtable): Stop compile time warnings about missing
	initialisers.
	(yyerror): Stop compile time warnings about unused paramater.
	(INIT_SEC_DATA): New macro: initialise an entry in the secdata
	array.
	(secdata): Stop ccompile time warnings about uninitialised
	fields.
	(dtab): Stop compile time warnings about unused parameter.
	(long_options): Stop compile time warning about missing
	initialiser. 

Index: dlltool.c
===================================================================
RCS file: /cvs/binutils/binutils/binutils/dlltool.c,v
retrieving revision 1.17
diff -p -r1.17 dlltool.c
*** dlltool.c	1999/12/09 17:42:25	1.17
--- dlltool.c	1999/12/17 18:32:40
*************** mtable[] =
*** 596,602 ****
      arm_jtab, sizeof (arm_jtab), 8
    }
    ,
!   { 0 }
  };
  
  typedef struct dlist
--- 596,602 ----
      arm_jtab, sizeof (arm_jtab), 8
    }
    ,
!   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
  };
  
  typedef struct dlist
*************** static int d_is_exe;
*** 868,874 ****
  
  int
  yyerror (err)
!      const char *err;
  {
    /* xgettext:c-format */
    warn (_("Syntax error in def file %s:%d\n"), def_file, linenumber);
--- 868,874 ----
  
  int
  yyerror (err)
!      const char *err ATTRIBUTE_UNUSED;
  {
    /* xgettext:c-format */
    warn (_("Syntax error in def file %s:%d\n"), def_file, linenumber);
*************** typedef struct
*** 2066,2080 ****
  
  #define NSECS 7
  
  static sinfo secdata[NSECS] =
  {
!   { TEXT,   ".text",    SEC_CODE | SEC_HAS_CONTENTS, 2},
!   { DATA,   ".data",    SEC_DATA,                    2},
!   { BSS,    ".bss",     0,                           2},
!   { IDATA7, ".idata$7", SEC_HAS_CONTENTS,            2},
!   { IDATA5, ".idata$5", SEC_HAS_CONTENTS,            2},
!   { IDATA4, ".idata$4", SEC_HAS_CONTENTS,            2},
!   { IDATA6, ".idata$6", SEC_HAS_CONTENTS,            1}
  };
  
  #else
--- 2066,2081 ----
  
  #define NSECS 7
  
+ #define INIT_SEC_DATA(id, name, flags, align) { id, name, flags, align, NULL, NULL, NULL, 0, NULL }
  static sinfo secdata[NSECS] =
  {
!   INIT_SEC_DATA (TEXT,   ".text",    SEC_CODE | SEC_HAS_CONTENTS, 2),
!   INIT_SEC_DATA (DATA,   ".data",    SEC_DATA,                    2),
!   INIT_SEC_DATA (BSS,    ".bss",     0,                           2),
!   INIT_SEC_DATA (IDATA7, ".idata$7", SEC_HAS_CONTENTS,            2),
!   INIT_SEC_DATA (IDATA5, ".idata$5", SEC_HAS_CONTENTS,            2),
!   INIT_SEC_DATA (IDATA4, ".idata$4", SEC_HAS_CONTENTS,            2),
!   INIT_SEC_DATA (IDATA6, ".idata$6", SEC_HAS_CONTENTS,            1)
  };
  
  #else
*************** remove_null_names (ptr)
*** 2876,2882 ****
  
  static void
  dtab (ptr)
!      export_type **ptr;
  {
  #ifdef SACDEBUG
    int i;
--- 2877,2887 ----
  
  static void
  dtab (ptr)
!      export_type **ptr
! #ifndef SACDEBUG
! ATTRIBUTE_UNUSED
! #endif
!      ;
  {
  #ifdef SACDEBUG
    int i;
*************** static const struct option long_options[
*** 3170,3176 ****
    {"as", required_argument, NULL, 'S'},
    {"as-flags", required_argument, NULL, 'f'},
    {"mcore-elf", required_argument, NULL, 'M'},
!   {0}
  };
  
  int
--- 3175,3181 ----
    {"as", required_argument, NULL, 'S'},
    {"as-flags", required_argument, NULL, 'f'},
    {"mcore-elf", required_argument, NULL, 'M'},
!   {NULL,0,NULL,0}
  };
  
  int

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