public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] RISC-V: Fix two ARI warnings.
Date: Thu, 17 Oct 2019 11:15:00 -0000	[thread overview]
Message-ID: <a83d4ef693d2bda527c6b73c2580a6fcaf63462c@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT a83d4ef693d2bda527c6b73c2580a6fcaf63462c ***

commit a83d4ef693d2bda527c6b73c2580a6fcaf63462c
Author:     Jim Wilson <jimw@sifive.com>
AuthorDate: Fri Oct 11 11:26:29 2019 -0700
Commit:     Jim Wilson <jimw@sifive.com>
CommitDate: Fri Oct 11 11:26:29 2019 -0700

    RISC-V: Fix two ARI warnings.
    
    > gdb/riscv-tdep.c:1657: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
    gdb/riscv-tdep.c:1657:                  "Writing %lld-byte nop instruction to %s: %s\n",
    > gdb/riscv-tdep.c:1658: code: long long: Do not use 'long long', instead use LONGEST
    gdb/riscv-tdep.c:1658:                  ((unsigned long long) sizeof (nop_insn)),
    
    fprintf_unfiltered doesn't support z (or j for that matter), and fixing that
    is a larger patch than I'd like to write, so this does basically what the
    ARI warnings recommends.  We don't need the cast as there is a prototype for
    plongest.
    
            * riscv-tdep.c (riscv_push_dummy_code): Change %lld to %s and use
            plongest instead of unsigned long long cast.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fba57f3469..3c1f87b32d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-11  Jim Wilson  <jimw@sifive.com>
+
+	* riscv-tdep.c (riscv_push_dummy_code): Change %lld to %s and use
+	plongest instead of unsigned long long cast.
+
 2019-10-10  Christian Biesinger  <cbiesinger@google.com>
 
 	* main.c (captured_main_1): Include gdbtk.h and remove declarations
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index e4a66f1429..003b230fcf 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -1654,8 +1654,8 @@ riscv_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
 
   if (riscv_debug_breakpoints || riscv_debug_infcall)
     fprintf_unfiltered (gdb_stdlog,
-			"Writing %lld-byte nop instruction to %s: %s\n",
-			((unsigned long long) sizeof (nop_insn)),
+			"Writing %s-byte nop instruction to %s: %s\n",
+			plongest (sizeof (nop_insn)),
 			paddress (gdbarch, *bp_addr),
 			(status == 0 ? "success" : "failed"));
 


             reply	other threads:[~2019-10-17 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 11:15 gdb-buildbot [this message]
2019-10-17 11:15 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
2019-10-17 13:29 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot
2019-10-24 12:51 ` Failures on Fedora-i686, " gdb-buildbot
2019-10-24 13:29 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2019-10-24 14:10 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2019-10-24 14:45 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
2019-10-24 15:10 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot

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=a83d4ef693d2bda527c6b73c2580a6fcaf63462c@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@sourceware.org \
    /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).