This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Remove compile time warning from dlltool.c
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Tue, 12 Feb 2008 12:33:19 +0000
- Subject: PATCH: Remove compile time warning from dlltool.c
Hi Guys,
I am checking in the patch below to remove a compile time warning
message (about a const qualifier being dropped) when compiling dlltool.c
for an mcore-elf target.
Cheers
Nick
binutils/ChangeLog
2008-02-12 Nick Clifton <nickc@redhat.com>
* dlltool.c (mcore_elf_cache_filename): Add a const qualifier to
the argument.
(scan_obj_filename): Do not drop the const qualifier when calling
mcore_elf_cache_filename.
(struct fname_cache): Add const qualifier to filename field.
Index: binutils/dlltool.c
===================================================================
RCS file: /cvs/src/src/binutils/dlltool.c,v
retrieving revision 1.79
diff -c -3 -p -r1.79 dlltool.c
*** binutils/dlltool.c 4 Oct 2007 13:38:09 -0000 1.79
--- binutils/dlltool.c 12 Feb 2008 12:31:39 -0000
***************
*** 1,6 ****
/* dlltool.c -- tool to generate stuff for PE style DLLs
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
! 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Binutils.
--- 1,6 ----
/* dlltool.c -- tool to generate stuff for PE style DLLs
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
! 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GNU Binutils.
*************** static char *look_for_prog (const char *
*** 271,277 ****
static char *deduce_name (const char *);
#ifdef DLLTOOL_MCORE_ELF
! static void mcore_elf_cache_filename (char *);
static void mcore_elf_gen_out_file (void);
#endif
--- 271,277 ----
static char *deduce_name (const char *);
#ifdef DLLTOOL_MCORE_ELF
! static void mcore_elf_cache_filename (const char *);
static void mcore_elf_gen_out_file (void);
#endif
*************** scan_obj_file (const char *filename)
*** 1546,1552 ****
#ifdef DLLTOOL_MCORE_ELF
if (mcore_elf_out_file)
! mcore_elf_cache_filename ((char *) filename);
#endif
}
--- 1546,1552 ----
#ifdef DLLTOOL_MCORE_ELF
if (mcore_elf_out_file)
! mcore_elf_cache_filename (filename);
#endif
}
*************** deduce_name (const char *prog_name)
*** 3558,3564 ****
#ifdef DLLTOOL_MCORE_ELF
typedef struct fname_cache
{
! char * filename;
struct fname_cache * next;
}
fname_cache;
--- 3558,3564 ----
#ifdef DLLTOOL_MCORE_ELF
typedef struct fname_cache
{
! const char * filename;
struct fname_cache * next;
}
fname_cache;
*************** fname_cache;
*** 3566,3572 ****
static fname_cache fnames;
static void
! mcore_elf_cache_filename (char * filename)
{
fname_cache * ptr;
--- 3566,3572 ----
static fname_cache fnames;
static void
! mcore_elf_cache_filename (const char * filename)
{
fname_cache * ptr;