Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Simon Marchi <simark@simark.ca>, Joel Brobecker <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: New ARI warning Fri May 18 01:56:48 UTC 2018
Date: Fri, 18 May 2018 20:05:00 -0000	[thread overview]
Message-ID: <4f3b5ef9-f310-c4a3-a122-fe15aed41ab1@ericsson.com> (raw)
In-Reply-To: <effc7bffa56ecadb0d97e61ba3ebf90c@simark.ca>

On 2018-05-18 03:14 PM, Simon Marchi wrote:
> On 2018-05-18 15:03, Joel Brobecker wrote:
>> Right, which is why I formulated this as a question. I don't really
>> know what style we want there. But since it was easy to patch the
>> script, I thought I'd send that right away, to show one of the options.
>> But I'd be OK with deciding that unittests/ should follow the GDB
>> coding standards.
> 
> I think we can just add the /* ARI: ... */ comments, I'll try it later.  I don't see any reason why it would be harder in general to follow our code conventions in unit tests than anywhere else.  This case is just a bit of a special one.

Here's what I pushed:

From 1d143c36eedc0f0b124e6aa6fb3b98b1e6ff74b0 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@ericsson.com>
Date: Fri, 18 May 2018 15:47:56 -0400
Subject: [PATCH] format_pieces-selftests.c: Silence ARI warnings

Silence this:

unittests/format_pieces-selftests.c:51: warning: code: Do not use printf("%ll"), instead use printf("%s",phex()) to dump a `long long' value
unittests/format_pieces-selftests.c:56: warning: code: Do not use printf("%ll"), instead use printf("%s",phex()) to dump a `long long' value

gdb/ChangeLog:

	* unittests/format_pieces-selftests.c (test_format_specifier):
	Add ARI comments.
---
 gdb/ChangeLog                           | 5 +++++
 gdb/unittests/format_pieces-selftests.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d4d00f8..57edb23 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
+
+	* unittests/format_pieces-selftests.c (test_format_specifier):
+	Add ARI comments.
+
 2018-05-18  Tom Tromey  <tom@tromey.com>

 	* c-typeprint.c (maybe_print_hole): New function.
diff --git a/gdb/unittests/format_pieces-selftests.c b/gdb/unittests/format_pieces-selftests.c
index 6d11a9c..8f63247 100644
--- a/gdb/unittests/format_pieces-selftests.c
+++ b/gdb/unittests/format_pieces-selftests.c
@@ -48,12 +48,12 @@ test_escape_sequences ()
 static void
 test_format_specifier ()
 {
-  check ("Hello %d%llx%%d",
+  check ("Hello %d%llx%%d", /* ARI: %ll */
     {
       format_piece ("Hello ", literal_piece),
       format_piece ("%d", int_arg),
       format_piece ("", literal_piece),
-      format_piece ("%llx", long_long_arg),
+      format_piece ("%llx", long_long_arg), /* ARI: %ll */
       format_piece ("%%d", literal_piece),
     });
 }
-- 
2.7.4



      reply	other threads:[~2018-05-18 19:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18  2:06 GDB Administrator
2018-05-18  2:14 ` Simon Marchi
2018-05-18 18:51   ` Joel Brobecker
2018-05-18 19:00     ` Simon Marchi
2018-05-18 19:29       ` Joel Brobecker
2018-05-18 19:38         ` Simon Marchi
2018-05-18 20:05           ` Simon Marchi [this message]

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=4f3b5ef9-f310-c4a3-a122-fe15aed41ab1@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /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