bfd: Remove use of void pointer arithmetic

Message ID 20211006173313.27576-1-mforney@mforney.org
State New
Headers show
Series
  • bfd: Remove use of void pointer arithmetic
Related show

Commit Message

Michael Forney Oct. 6, 2021, 5:33 p.m.
This is not valid in ISO C. Instead, use a pointer to bfd_byte.

2021-10-06  Michael Forney  <mforney@mforney.org>

	* peicode.h (pe_bfd_object_p): Remove use of void pointer
	arithmetic.
---
 bfd/peicode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.32.0

Comments

Alan Modra via Binutils Oct. 11, 2021, 9:46 a.m. | #1
On Wed, Oct 06, 2021 at 10:33:13AM -0700, Michael Forney wrote:
> 	* peicode.h (pe_bfd_object_p): Remove use of void pointer

> 	arithmetic.


Thanks, applied.

-- 
Alan Modra
Australia Development Lab, IBM

Patch

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))