This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

Re: Problems building binutils cvs trunk on i686-pc-mingw32


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);
  }
  

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