[binutils-gdb] bfd: Remove use of void pointer arithmetic

Alan Modra amodra@sourceware.org
Mon Oct 11 09:45:52 GMT 2021


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b6fca8a3d501a4dca0726fe8b89d18d9ba5780c6

commit b6fca8a3d501a4dca0726fe8b89d18d9ba5780c6
Author: Michael Forney <mforney@mforney.org>
Date:   Wed Oct 6 10:33:13 2021 -0700

    bfd: Remove use of void pointer arithmetic
    
    This is not valid in ISO C. Instead, use a pointer to bfd_byte.
    
            * peicode.h (pe_bfd_object_p): Remove use of void pointer
            arithmetic.

Diff:
---
 bfd/peicode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/peicode.h b/bfd/peicode.h
index c84b135e1eb..41955975cdc 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -1474,7 +1474,7 @@ pe_bfd_object_p (bfd * abfd)
   if (opt_hdr_size != 0)
     {
       bfd_size_type amt = opt_hdr_size;
-      void * opthdr;
+      bfd_byte * opthdr;
 
       /* PR 17521 file: 230-131433-0.004.  */
       if (amt < sizeof (PEAOUTHDR))


More information about the Binutils-cvs mailing list