This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Fix Compile Time Warnings: ld/emultempl
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 23 Feb 2005 16:59:28 +0000
- Subject: Fix Compile Time Warnings: ld/emultempl
Hi Guys,
Here are a couple of small patches to files in the ld/emultempl
directory. The first fixes the lnk960,em file which was calling
concat() without terminating the list of arguments with a NULL. The
second fixes m68coff.em so that there are no undefined types
encountered in the prototypes defined in ldfile.h.
Cheers
Nick
ld/ChangeLog
2005-02-23 Nick Clifton <nickc@redhat.com>
* emultempl/lnk960.em (lnk960_before_parse): Terminate list of
arguments passed to concat() with a NULL.
* emultempl/m68kcoff.em: Include ldexp.h and ldlang.h because they
define types needed by ldfile.h
Index: ld/emultempl/lnk960.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/lnk960.em,v
retrieving revision 1.13
diff -c -3 -p -r1.13 lnk960.em
*** ld/emultempl/lnk960.em 27 Jun 2003 00:38:25 -0000 1.13
--- ld/emultempl/lnk960.em 23 Feb 2005 16:44:09 -0000
***************
*************** lnk960_before_parse (void)
*** 94,105 ****
{
env = (char *) getenv (*p);
if (env)
! ldfile_add_library_path (concat (env, "/lib/libcoff", ""), FALSE);
}
env = (char *) getenv ("I960BASE");
if (env)
! ldfile_add_library_path(concat (env, "/lib", ""), FALSE);
ldfile_output_architecture = bfd_arch_i960;
ldfile_output_machine = bfd_mach_i960_core;
--- 94,105 ----
{
env = (char *) getenv (*p);
if (env)
! ldfile_add_library_path (concat (env, "/lib/libcoff", "", NULL), FALSE);
}
env = (char *) getenv ("I960BASE");
if (env)
! ldfile_add_library_path (concat (env, "/lib", "", NULL), FALSE);
ldfile_output_architecture = bfd_arch_i960;
ldfile_output_machine = bfd_mach_i960_core;
*************** lnk960_before_parse (void)
*** 119,126 ****
einfo ("%P%F I960BASE and G960BASE not set\n");
}
!
! ldfile_add_library_path (concat (name, "/lib", ""), FALSE);
ldfile_output_architecture = bfd_arch_i960;
ldfile_output_machine = bfd_mach_i960_core;
}
--- 119,125 ----
einfo ("%P%F I960BASE and G960BASE not set\n");
}
! ldfile_add_library_path (concat (name, "/lib", "", NULL), FALSE);
ldfile_output_architecture = bfd_arch_i960;
ldfile_output_machine = bfd_mach_i960_core;
}
Index: ld/emultempl/m68kcoff.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/m68kcoff.em,v
retrieving revision 1.10
diff -c -3 -p -r1.10 m68kcoff.em
*** ld/emultempl/m68kcoff.em 3 Jan 2004 11:09:07 -0000 1.10
--- ld/emultempl/m68kcoff.em 23 Feb 2005 16:44:09 -0000
*************** Foundation, Inc., 59 Temple Place - Suit
*** 33,38 ****
--- 33,40 ----
#include "ld.h"
#include "ldmain.h"
+ #include "ldexp.h"
+ #include "ldlang.h"
#include "ldfile.h"
#include "ldemul.h"
#include "ldmisc.h"