public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: gcc-patches@gcc.gnu.org
Cc: fw@gcc.gnu.org, Iain Sandoe <iain@sandoe.co.uk>,
	Sam James <sam@gentoo.org>
Subject: [11 PATCH] libiberty, Darwin: Fix a build warning. [PR112823]
Date: Sat,  2 Dec 2023 05:30:22 +0000	[thread overview]
Message-ID: <20231202053024.1689677-1-sam@gentoo.org> (raw)

From: Iain Sandoe <iain@sandoe.co.uk>

r12-3005-g220c410162ebece4f missed a cast for the set_32 call.
Fixed thus.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
Signed-off-by: Sam James <sam@gentoo.org>

libiberty/ChangeLog:
	PR other/112823
	* simple-object-mach-o.c (simple_object_mach_o_write_segment):
	Cast the first argument to set_32 as needed.

(cherry picked from commit 38757aa88735ab2e511bc428e2407a5a5e9fa0be)
---
 libiberty/simple-object-mach-o.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libiberty/simple-object-mach-o.c b/libiberty/simple-object-mach-o.c
index 72b69d19c216..a8869e7c6395 100644
--- a/libiberty/simple-object-mach-o.c
+++ b/libiberty/simple-object-mach-o.c
@@ -1228,7 +1228,7 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor,
       /* Swap the indices, if required.  */
 
       for (i = 0; i < (nsects_in * 4); ++i)
-	set_32 (&index[i], index[i]);
+	set_32 ((unsigned char *) &index[i], index[i]);
 
       sechdr_offset += sechdrsize;
 
-- 
2.43.0


             reply	other threads:[~2023-12-02  5:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02  5:30 Sam James [this message]
2023-12-02  7:20 ` Iain Sandoe
2023-12-02  7:31   ` Sam James
2023-12-02  9:13 FX Coudert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231202053024.1689677-1-sam@gentoo.org \
    --to=sam@gentoo.org \
    --cc=fw@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).