public inbox for binutils-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] PowerPC64: fix build error on 32-bit hosts
@ 2022-07-21  4:06 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-07-21  4:06 UTC (permalink / raw)
  To: bfd-cvs

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

commit 590207aa6ece509eabbc7a51aab87e5d9bcfc869
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Jul 21 13:31:51 2022 +0930

    PowerPC64: fix build error on 32-bit hosts
    
    elf64-ppc.c:11673:33: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘bfd_vma’ {aka ‘long long unsigned int’} [-Werror=format=]
    11673 |   fprintf (stderr, "offset = %#lx:", stub_entry->stub_offset);
          |                              ~~~^    ~~~~~~~~~~~~~~~~~~~~~~~
          |                                 |              |
          |                                 |              bfd_vma {aka long long unsigned int}
          |                                 long unsigned int
          |                              %#llx
    
            * elf64-ppc.c (dump_stub): Use BFD_VMA_FMT.

Diff:
---
 bfd/elf64-ppc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 77e8f596d15..570b3563f2c 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -11670,7 +11670,7 @@ dump_stub (const char *header,
   fprintf (stderr, "%s id = %u type = %s:%s:%s\n",
 	   header, stub_entry->id, t1, t2, t3);
   fprintf (stderr, "name = %s\n", stub_entry->root.string);
-  fprintf (stderr, "offset = %#lx:", stub_entry->stub_offset);
+  fprintf (stderr, "offset = 0x%" BFD_VMA_FMT "x:", stub_entry->stub_offset);
   for (size_t i = stub_entry->stub_offset; i < end_offset; i += 4)
     {
       asection *stub_sec = stub_entry->group->stub_sec;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-21  4:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21  4:06 [binutils-gdb] PowerPC64: fix build error on 32-bit hosts 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).