This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New ARI warning Fri May 18 01:56:48 UTC 2018


Hi Simon,

> >> gdb/unittests/format_pieces-selftests.c:51: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
> > gdb/unittests/format_pieces-selftests.c:51:  check ("Hello %d%llx%%d",
> >> gdb/unittests/format_pieces-selftests.c:56: code: %ll: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
> > gdb/unittests/format_pieces-selftests.c:56:      format_piece ("%llx", long_long_arg),
> > 
> 
> These are false positives.

You can tag them as OK with a /* ARI: ... */ comment.

But I suspect we just want to exclude files in gdb/unittests instead?
Here is a patch that does that. Tested by checking the change in
output before and after:

    1101,1120d1100
    < ./unittests/array-view-selftests.c
    < ./unittests/common-utils-selftests.c
    < ./unittests/environ-selftests.c
    < ./unittests/function-view-selftests.c
    < ./unittests/lookup_name_info-selftests.c
    < ./unittests/memory-map-selftests.c
    < ./unittests/memrange-selftests.c
    < ./unittests/observable-selftests.c
    < ./unittests/offset-type-selftests.c
    < ./unittests/optional-selftests.c
    < ./unittests/ptid-selftests.c
    < ./unittests/rsp-low-selftests.c
    < ./unittests/scoped_fd-selftests.c
    < ./unittests/scoped_mmap-selftests.c
    < ./unittests/scoped_restore-selftests.c
    < ./unittests/string_view-selftests.c
    < ./unittests/tracepoint-selftests.c
    < ./unittests/unpack-selftests.c
    < ./unittests/utils-selftests.c
    < ./unittests/xml-utils-selftests.c

gdb/ChangeLog:

        * contrib/ari/gdb_find.sh: Exclude the unittest directory.

-- 
Joel
>From 68f15bf62a21633b8bf5c1f4c68722a2a1f0c7c8 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Fri, 18 May 2018 11:25:52 -0700
Subject: [PATCH] (gdb) Do not apply ARI checks to unittests files

This directory contains files that are for testing purposes only,
and so don't really have to confirm to the GDB Coding Standards.

gdb/ChangeLog:

        * contrib/ari/gdb_find.sh: Exclude the unittest directory.
---
 gdb/contrib/ari/gdb_find.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/contrib/ari/gdb_find.sh b/gdb/contrib/ari/gdb_find.sh
index 304761832a..0be71635bd 100644
--- a/gdb/contrib/ari/gdb_find.sh
+++ b/gdb/contrib/ari/gdb_find.sh
@@ -31,6 +31,7 @@ LC_ALL=C ; export LC_ALL
 
 find "$@" \
     -name testsuite -prune -o \
+    -name unittests -prune -o \
     -name gdbserver -prune -o \
     -name gdbtk -prune -o \
     -name gnulib -prune -o \
-- 
2.11.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]