public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4744] contrib: make warnings unique in filter-clang-warnings.py
@ 2022-12-16 12:07 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-12-16 12:07 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d386d399205e68e02b357dfcd96b9a4b91e4f295

commit r13-4744-gd386d399205e68e02b357dfcd96b9a4b91e4f295
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Dec 16 13:07:27 2022 +0100

    contrib: make warnings unique in filter-clang-warnings.py
    
    contrib/ChangeLog:
    
            * filter-clang-warnings.py: Print each warning only one time.

Diff:
---
 contrib/filter-clang-warnings.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/filter-clang-warnings.py b/contrib/filter-clang-warnings.py
index c426bce5eb5..0973d74d8d9 100755
--- a/contrib/filter-clang-warnings.py
+++ b/contrib/filter-clang-warnings.py
@@ -72,7 +72,7 @@ args = parser.parse_args()
 
 lines = [line.strip() for line in open(args.log)]
 total = 0
-messages = []
+messages = set()
 for line in lines:
     token = ': warning: '
     i = line.find(token)
@@ -81,7 +81,7 @@ for line in lines:
         message = line[i + len(token):]
         if not skip_warning(location, message):
             total += 1
-            messages.append(line)
+            messages.add(line)
 
 for line in sorted(messages):
     print(line)

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

only message in thread, other threads:[~2022-12-16 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16 12:07 [gcc r13-4744] contrib: make warnings unique in filter-clang-warnings.py Martin Liska

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).