Received: by mail.netbsd.org (Postfix, from userid 605) id AFDF584D50; Fri, 1 Jul 2022 21:48:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id CDEAB84D50 for ; Fri, 1 Jul 2022 21:48:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id DUiRmm7bW6sL for ; Fri, 1 Jul 2022 21:48:05 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 61EBD84D0E for ; Fri, 1 Jul 2022 21:48:05 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 5A9E8FB1A; Fri, 1 Jul 2022 21:48:05 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Fri, 1 Jul 2022 21:48:05 +0000 From: "Roland Illig" Subject: CVS commit: src/usr.bin/xlint/lint1 To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20220701214805.5A9E8FB1A@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Roland Illig" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: rillig Date: Fri Jul 1 21:48:05 UTC 2022 Modified Files: src/usr.bin/xlint/lint1: err.c Log Message: lint: clean up suppression of warnings and errors Since lint1.h 1.11 from 2001-12-13, lint1 had been a memory hog. While it used a bit set for keeping track of the message IDs of the suppressed messages, it only used the lower 4 bits of each 32-bit word, due to a missing CHAR_BIT in __NERRBITS. As a quick hack, the bit set had 1024 entries, much more than the number of actual messages, which is currently at 350. This meant 674 bytes of wasted memory, plus the code size for the bit manipulations. The only functional change is that the option '-X' now only accepts actually valid message IDs. Previously it had accepted all numbers from 0 to 1023. To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/usr.bin/xlint/lint1/err.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.