diff options
author | Tristan Gingold <gingold@adacore.com> | 2010-11-04 13:51:36 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2010-11-04 13:51:36 +0000 |
commit | 9d8c28beb1c1eb7f1a59d9bd42b3df216a2b7a1a (patch) | |
tree | 91566133974f1cbd1a2643417ef53f5ae502ccb4 /bfd/vms-lib.c | |
parent | 62a6d85d00d219c7ad5be1e40f8772e85722409e (diff) | |
download | binutils-redhat-9d8c28beb1c1eb7f1a59d9bd42b3df216a2b7a1a.tar.gz |
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.
Diffstat (limited to 'bfd/vms-lib.c')
-rw-r--r-- | bfd/vms-lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c index c9a9fc695d..6e86df3b5c 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--; |