This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problems building binutils cvs trunk on i686-pc-mingw32
- From: Nick Clifton <nickc at redhat dot com>
- To: Christian Joensson <christian dot joensson at gmail dot com>
- Cc: binutils <binutils at sources dot redhat dot com>
- Date: Tue, 14 Jun 2005 11:16:59 +0100
- Subject: Re: Problems building binutils cvs trunk on i686-pc-mingw32
- References: <5460e333050613163548b5fc7d@mail.gmail.com>
Hi Christian,
../../src/binutils/rename.c:143: warning: unused parameter 'preserve_dates'
../../src/binutils/rename.c:50: warning: 'simple_copy' defined but not used
../../src/binutils/resres.c:411: warning: comparison between signed and unsigned
Please could you try the attached patch and let me know if it resolves
these build failures. If so I will check it in.
Cheers
Nick
binutils/ChangeLog
2005-06-14 Nick Clifton <nickc@redhat.com>
* rename.c (simple_copy): Only define if it is going to be used.
(smart_rename): Mark the preserve_dates parameter as possibly
being unused.
* resres.c (write_res_data): Prevent a potential compile time
warning by casting the return value from fwrite.
Index: binutils/rename.c
===================================================================
RCS file: /cvs/src/src/binutils/rename.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 rename.c
*** binutils/rename.c 8 May 2005 14:17:39 -0000 1.9
--- binutils/rename.c 14 Jun 2005 10:10:02 -0000
***************
*** 37,42 ****
--- 37,43 ----
#define O_BINARY 0
#endif
+ #if ! defined (_WIN32) || defined (__CYGWIN32__)
static int simple_copy (const char *, const char *);
/* The number of bytes to copy at once. */
*************** simple_copy (const char *from, const cha
*** 88,93 ****
--- 89,95 ----
}
return 0;
}
+ #endif /* __CYGWIN32__ or not _WIN32 */
/* Set the times of the file DESTINATION to be the same as those in
STATBUF. */
*************** set_times (const char *destination, cons
*** 140,146 ****
Return 0 if ok, -1 if error. */
int
! smart_rename (const char *from, const char *to, int preserve_dates)
{
bfd_boolean exists;
struct stat s;
--- 142,148 ----
Return 0 if ok, -1 if error. */
int
! smart_rename (const char *from, const char *to, int preserve_dates ATTRIBUTE_UNUSED)
{
bfd_boolean exists;
struct stat s;
Index: binutils/resres.c
===================================================================
RCS file: /cvs/src/src/binutils/resres.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 resres.c
*** binutils/resres.c 8 May 2005 14:17:39 -0000 1.6
--- binutils/resres.c 14 Jun 2005 10:10:02 -0000
*************** write_res_data (data, size, count)
*** 408,414 ****
size_t size;
int count;
{
! if (fwrite (data, size, count, fres) != (size_t) count)
fatal ("%s: could not write to file", filename);
}
--- 408,414 ----
size_t size;
int count;
{
! if ((size_t) fwrite (data, size, count, fres) != (size_t) count)
fatal ("%s: could not write to file", filename);
}