aboutsummaryrefslogtreecommitdiff
path: root/bfd/vms-lib.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2010-11-04 13:51:37 +0000
committerTristan Gingold <gingold@adacore.com>2010-11-04 13:51:37 +0000
commit52e00d50337ce0e3ccad7a99c301851dfc721ec2 (patch)
tree4ab473604cdaf07e4f6a0aa652e5936be9aae458 /bfd/vms-lib.c
parent129b5d55a3dca92ea486dfcecec18055fa6815cc (diff)
downloadgdb-52e00d50337ce0e3ccad7a99c301851dfc721ec2.zip
gdb-52e00d50337ce0e3ccad7a99c301851dfc721ec2.tar.gz
gdb-52e00d50337ce0e3ccad7a99c301851dfc721ec2.tar.bz2
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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c
index c9a9fc6..6e86df3 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--;