From: Tristan Gingold Date: Thu, 4 Nov 2010 13:51:37 +0000 (+0000) Subject: 2010-11-04 Tristan Gingold X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52e00d50337ce0e3ccad7a99c301851dfc721ec2;p=binutils-gdb.git 2010-11-04 Tristan Gingold * makefile.vms (CFLAGS): Make badalias warnings informational. * vms-lib.c (vms_lib_bread): Avoid arithmetic on void pointer. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2a14bc6f668..ab5b3308307 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2010-11-04 Tristan Gingold + + * makefile.vms (CFLAGS): Make badalias warnings informational. + * vms-lib.c (vms_lib_bread): Avoid arithmetic on void pointer. + 2010-11-04 Joseph Myers * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low, diff --git a/bfd/makefile.vms b/bfd/makefile.vms index f0135549182..8cbb6807d99 100644 --- a/bfd/makefile.vms +++ b/bfd/makefile.vms @@ -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) diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c index c9a9fc695da..6e86df3b5cd 100644 --- a/bfd/vms-lib.c +++ b/bfd/vms-lib.c @@ -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--;