From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 5D5283858425; Wed, 21 Dec 2022 08:10:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D5283858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671610243; bh=l5mpGmVwsUl+Ya5f8CQPF4Z7B/gCsMxls7yPVFZzB0A=; h=From:To:Subject:Date:From; b=Uhc+Bk4TzaEV299xqUtN7uGdMmAE4tnh4wYiCdj6Dp+IbI7q/HfXwEQxyJ+Nlnu0h w4rNrv2/bz+QVTNttPHL7UkIJo2pOHmv09MfWTeO/qkBuoGP2c/cnT54yuBeiQnm2d 133v5YDKHr08DUzCSAxXd4GSpuyr6qyigaF3DPOU= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-4823] contrib: simplify filter-clang-warnings.py X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/master X-Git-Oldrev: 1119902b6c7c1c50123ed85ec1def8be4772d68c X-Git-Newrev: af49fd41abcb0bcbdf7db39ef6b87df2a79b0e45 Message-Id: <20221221081043.5D5283858425@sourceware.org> Date: Wed, 21 Dec 2022 08:10:43 +0000 (GMT) List-Id: https://gcc.gnu.org/g:af49fd41abcb0bcbdf7db39ef6b87df2a79b0e45 commit r13-4823-gaf49fd41abcb0bcbdf7db39ef6b87df2a79b0e45 Author: Martin Liska Date: Wed Dec 21 09:10:07 2022 +0100 contrib: simplify filter-clang-warnings.py contrib/ChangeLog: * filter-clang-warnings.py: Simplify. Diff: --- contrib/filter-clang-warnings.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/filter-clang-warnings.py b/contrib/filter-clang-warnings.py index 56dce5af368..06410cf2444 100755 --- a/contrib/filter-clang-warnings.py +++ b/contrib/filter-clang-warnings.py @@ -71,7 +71,6 @@ parser.add_argument('log', help='Log file with clang warnings') args = parser.parse_args() lines = [line.strip() for line in open(args.log)] -total = 0 messages = set() for line in lines: token = ': warning: ' @@ -82,9 +81,9 @@ for line in lines: if '/libffi/' in location or location.startswith('Makefile'): continue if not skip_warning(location, message): - total += 1 messages.add(line) for line in sorted(messages): print(line) -print('\nTotal warnings: %d' % total) + +print('\nTotal warnings: %d' % len(messages))