2010-11-04 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Thu, 4 Nov 2010 13:51:37 +0000 (13:51 +0000)
committerTristan Gingold <gingold@adacore.com>
Thu, 4 Nov 2010 13:51:37 +0000 (13:51 +0000)
* makefile.vms (CFLAGS): Make badalias warnings informational.
* vms-lib.c (vms_lib_bread): Avoid arithmetic on void pointer.

bfd/ChangeLog
bfd/makefile.vms
bfd/vms-lib.c

index 2a14bc6f66844eeccb8c85ea9e8d5e0ea8a8da33..ab5b330830784f45bb70a901ea13f38749a79bdf 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-04  Tristan Gingold  <gingold@adacore.com>
+
+       * makefile.vms (CFLAGS): Make badalias warnings informational.
+       * vms-lib.c (vms_lib_bread): Avoid arithmetic on void pointer.
+
 2010-11-04  Joseph Myers  <joseph@codesourcery.com>
 
        * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low,
index f01355491824a35c6a79d78b5e293e8bd77ba75d..8cbb6807d99c0de8e3a18794976c763a7269904e 100644 (file)
@@ -37,7 +37,7 @@ else
 OPT=/noopt/debug
 CFLAGS=/name=(as_is,shortened)/include=([],"../include")\
  /define=("unlink=remove",DEBUGDIR="""GNU$$DEBUGDIR:""",$(DEFS))\
- /warns=(infor=missingreturn)$(OPT)
+ /warns=(infor=(missingreturn,badansialias))$(OPT)
 endif
 
 libbfd.olb: $(OBJS)
index c9a9fc695dafdf9b5763bbb9e60a1d6c5bf6e96a..6e86df3b5cd8f234e2a081c930d553da55a7ddcb 100644 (file)
@@ -951,11 +951,12 @@ vms_lib_dcx (struct vms_lib_iovec *vec, unsigned char *buf, file_ptr nbytes)
 /* Standard IOVEC function.  */
 
 static file_ptr
-vms_lib_bread (struct bfd *abfd, void *buf, file_ptr nbytes)
+vms_lib_bread (struct bfd *abfd, void *vbuf, file_ptr nbytes)
 {
   struct vms_lib_iovec *vec = (struct vms_lib_iovec *) abfd->iostream;
   file_ptr res;
   file_ptr chunk;
+  unsigned char *buf = (unsigned char *)vbuf;
 
   /* Do not read past the end.  */
   if (vec->where >= vec->file_len)
@@ -1071,7 +1072,7 @@ vms_lib_bread (struct bfd *abfd, void *buf, file_ptr nbytes)
             }
           if (buf != NULL)
             {
-              *(unsigned char *)buf = c;
+              *buf = c;
               buf++;
             }
           nbytes--;
This page took 0.045176 seconds and 4 git commands to generate.