This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Warning fixes for ld/*
- To: binutils at sources dot redhat dot com
- Subject: Warning fixes for ld/*
- From: Andreas Jaeger <aj at suse dot de>
- Date: Sun, 02 Sep 2001 13:23:10 +0200
The appended patch fixes most of the "function declaration isn't a
prototype" warnings for the ld emulations.
There's one case I wasn't sure and left it:
beos.em contains these lines:
#if 0 /* argument to qsort so don't prototype */
static int sort_by_file_name PARAMS ((void *, void *));
static int sort_by_section_name PARAMS ((void *, void *));
#endif
static lang_statement_union_type **sort_sections_1
PARAMS ((lang_statement_union_type **, lang_statement_union_type *, int,
int (*)()));
And therefore I still get some warnings in ei386beos. I don't know
why we don't want prototypes here.
Ok to commit the appended patch?
Andreas
2001-09-02 Andreas Jaeger <aj@suse.de>
* emultempl/aix.em: Add missing prototype.
* emultempl/lnk960.em: Likewise.
* emultempl/vanilla.em: Likewise.
* emultempl/armcoff.em: Likewise.
* emultempl/armelf_oabi.em: Likewise.
* emultempl/beos.em: Likewise.
* emultempl/gld960c.em: Likewise.
* emultempl/gld960.em: Likewise.
* emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
for prototype declaration.
============================================================
Index: ld/emultempl/aix.em
--- ld/emultempl/aix.em 2001/08/18 15:42:26 1.12
+++ ld/emultempl/aix.em 2001/09/02 11:22:47
@@ -65,6 +65,8 @@
PARAMS ((lang_statement_union_type *));
static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *));
static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
+static boolean gld${EMULATION_NAME}_unrecognized_file
+ PARAMS ((lang_input_statement_type *));
/* The file alignment required for each section. */
static unsigned long file_align;
============================================================
Index: ld/emultempl/lnk960.em
--- ld/emultempl/lnk960.em 2001/03/13 06:14:27 1.6
+++ ld/emultempl/lnk960.em 2001/09/02 11:22:48
@@ -2,7 +2,7 @@
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
/* intel coff loader emulation specific stuff
- Copyright 1991, 1992, 1994, 1995, 1996, 1999, 2000
+ Copyright 1991, 1992, 1994, 1995, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -46,6 +46,18 @@
static lib_list_type *syslib_list;
static lib_list_type **syslib_list_tail = &syslib_list;
+
+static void append PARAMS ((lib_list_type ***, char *));
+static void lnk960_hll PARAMS ((char *));
+static void lnk960_syslib PARAMS ((char *));
+static void lnk960_before_parse PARAMS ((void));
+static void add_on PARAMS ((lib_list_type *, lang_input_file_enum_type));
+static void lnk960_after_parse PARAMS ((void));
+static void lnk960_before_allocation PARAMS ((void));
+static void lnk960_after_allocation PARAMS ((void));
+static void lnk960_set_output_arch PARAMS ((void));
+static char *lnk960_choose_target PARAMS ((void));
+static char *lnk960_get_script PARAMS ((int *));
static void
============================================================
Index: ld/emultempl/vanilla.em
--- ld/emultempl/vanilla.em 2001/03/13 06:14:27 1.5
+++ ld/emultempl/vanilla.em 2001/09/02 11:22:48
@@ -2,7 +2,7 @@
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
/* A vanilla emulation with no defaults
- Copyright 1991, 1992, 1994, 2000 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1994, 2000, 2001 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -33,6 +33,11 @@
#include "ldlang.h"
#include "ldfile.h"
#include "ldemul.h"
+
+static void vanilla_before_parse PARAMS ((void));
+static void vanilla_set_output_arch PARAMS ((void));
+static char *vanilla_get_script PARAMS ((int *));
+
static void vanilla_before_parse()
{
============================================================
Index: ld/emultempl/armcoff.em
--- ld/emultempl/armcoff.em 2001/03/13 06:14:27 1.10
+++ ld/emultempl/armcoff.em 2001/09/02 11:22:48
@@ -4,7 +4,7 @@
/* This file is is generated by a shell script. DO NOT EDIT! */
/* emulate the original gld for the given ${EMULATION_NAME}
- Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -46,6 +46,7 @@
static int gld${EMULATION_NAME}_parse_args PARAMS((int, char **));
static void gld${EMULATION_NAME}_list_options PARAMS ((FILE *));
static void gld${EMULATION_NAME}_finish PARAMS ((void));
+static void gld${EMULATION_NAME}_after_open PARAMS ((void));
/* If true, then interworking stubs which support calls to old, non-interworking
aware ARM code should be generated. */
============================================================
Index: ld/emultempl/armelf_oabi.em
--- ld/emultempl/armelf_oabi.em 2001/03/13 06:14:27 1.7
+++ ld/emultempl/armelf_oabi.em 2001/09/02 11:22:48
@@ -4,7 +4,7 @@
/* This file is is generated by a shell script. DO NOT EDIT! */
/* emulate the original gld for the given ${EMULATION_NAME}
- Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -50,6 +50,7 @@
static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
+static void gld${EMULATION_NAME}_after_open PARAMS ((void));
static void
gld${EMULATION_NAME}_before_parse ()
============================================================
Index: ld/emultempl/beos.em
--- ld/emultempl/beos.em 2001/08/20 02:14:50 1.13
+++ ld/emultempl/beos.em 2001/09/02 11:22:49
@@ -69,6 +69,11 @@
int (*)()));
static void sort_sections PARAMS ((lang_statement_union_type *));
+static void set_pe_name PARAMS ((char *, long int));
+static void set_pe_subsystem PARAMS ((void));
+static void set_pe_value PARAMS ((char *));
+static void set_pe_stack_heap PARAMS ((char *, char *));
+
static struct internal_extra_pe_aouthdr pe;
static int dll;
============================================================
Index: ld/emultempl/gld960c.em
--- ld/emultempl/gld960c.em 2001/03/13 06:14:27 1.6
+++ ld/emultempl/gld960c.em 2001/09/02 11:22:49
@@ -1,7 +1,7 @@
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
-/* Copyright 1991, 1993, 1994, 1996, 1999, 2000
+/* Copyright 1991, 1993, 1994, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -40,6 +40,11 @@
#include "ldlang.h"
#include "ldfile.h"
#include "ldemul.h"
+
+static void gld960_before_parse PARAMS ((void));
+static void gld960_set_output_arch PARAMS ((void));
+static char *gld960_choose_target PARAMS ((void));
+static char *gld960_get_script PARAMS ((int *));
#ifdef GNU960
============================================================
Index: ld/emultempl/gld960.em
--- ld/emultempl/gld960.em 2001/03/13 06:14:27 1.6
+++ ld/emultempl/gld960.em 2001/09/02 11:22:49
@@ -1,7 +1,8 @@
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
-/* Copyright 1991, 1992, 1994, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright 1991, 1992, 1994, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -37,6 +38,11 @@
#include "ldlang.h"
#include "ldfile.h"
#include "ldemul.h"
+
+static void gld960_before_parse PARAMS ((void));
+static char *gld960_choose_target PARAMS ((void));
+static void gld960_set_output_arch PARAMS ((void));
+static char *gld960_get_script PARAMS ((int *));
#ifdef GNU960
============================================================
Index: ld/emulparams/elf64alpha.sh
--- ld/emulparams/elf64alpha.sh 2000/11/28 10:43:11 1.5
+++ ld/emulparams/elf64alpha.sh 2001/09/02 11:22:49
@@ -24,7 +24,7 @@
static int elf64alpha_32bit = 0;
struct ld_emulation_xfer_struct ld_elf64alpha_emulation;
-static void gld_elf64alpha_finish ();
+static void gld_elf64alpha_finish PARAMS ((void));
'
PARSE_AND_LIST_LONGOPTS='
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj