public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] bfd: Remove use of void pointer arithmetic
@ 2021-10-06 17:33 Michael Forney
  2021-10-11  9:46 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Forney @ 2021-10-06 17:33 UTC (permalink / raw)
  To: binutils

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

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] bfd: Remove use of void pointer arithmetic
  2021-10-06 17:33 [PATCH] bfd: Remove use of void pointer arithmetic Michael Forney
@ 2021-10-11  9:46 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2021-10-11  9:46 UTC (permalink / raw)
  To: Michael Forney; +Cc: binutils

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-11  9:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 17:33 [PATCH] bfd: Remove use of void pointer arithmetic Michael Forney
2021-10-11  9:46 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).