From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 905701F461 for ; Sun, 8 Sep 2019 13:05:55 +0000 (UTC) Received: from localhost ([::1]:48734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6wt8-0006t7-9I for normalperson@yhbt.net; Sun, 08 Sep 2019 09:05:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45919) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6wjt-0005Bv-MT for bug-gnulib@gnu.org; Sun, 08 Sep 2019 08:56:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46577) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i6wjt-00014g-Il for bug-gnulib@gnu.org; Sun, 08 Sep 2019 08:56:21 -0400 Received: from [2a02:8071:2cc2:ca00:f276:1cff:fe69:ac2c] (port=55012 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i6wjt-0001r3-1U for bug-gnulib@gnu.org; Sun, 08 Sep 2019 08:56:21 -0400 Date: Sun, 8 Sep 2019 14:56:19 +0200 From: Darshit Shah To: bug-gnulib@gnu.org Subject: sc_prohibit_magic_number_exit false positive on string Message-ID: <20190908125619.qabhrayjeeium3du@tardis.localdomain> Mail-Followup-To: bug-gnulib@gnu.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dcoushr4ixzfhm7k" Content-Disposition: inline User-Agent: NeoMutt/20180716 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" --dcoushr4ixzfhm7k Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I just realized that the syntax check rule sc_prohibit_magic_number_exit wi= ll cause a false positive when it finds the relevant tokens within a string as well. For example, in Wget, we have the following snippet in our tests which trips this rule: > WGET_TEST_EXPECTED_FILES, &(wget_test_file_t []) { > { "exit-status.txt", "exit(8)\n" }, > { NULL } }, I made a very tiny change to the rule in maint.mk(L408) to account for this: -exclude=3D'exit \(77\)|error ?\(((0|77),|[^,]*)' \ +exclude=3D'exit \(77\)|error ?\(((0|77),|[^,]*)|"(usage|exit|error).*"' \ --=20 Thanking You, Darshit Shah PGP Fingerprint: 7845 120B 07CB D8D6 ECE5 FF2B 2A17 43ED A91A 35B6 --dcoushr4ixzfhm7k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJgBAABCgBKFiEEa5j2N9h5xSNuJ3xcZP+QqujHCvkFAl10+m0sFIAAAAAAFQAO cGthLWFkZHJlc3NAZ251cGcub3JnZGFybmlyQGdudS5vcmcACgkQZP+QqujHCvmx Bw/6AzEsYOM+K43HjJKtrJOfUatl7/olwwUvAr/Krjb7RE/P2XaU1DdN0DUCIlbN +jdhHVjMZq3MG6wnGGt54zi/kXAfenAoJjx3RroU2lSBrn1kjwxHObGOKHm3jX9o 8wzKGidb0yCSkDlMAqmw6Vs2AlMCTESeWzeAG1Dn5gPzB8/v+VZw9QDqQz1ly+F6 iESK5bD3C+3XZjfqWR+uHXjw0OQPHWj7IpX4LeKtWPnpl+itgUySYtYUCi6Szirg jw3J0PXCZ+ELiQGw9xq5KUfSM3WRar5HoV5o4h0VnxzfS8mDY768u9iRdH//PxkO hBev+XV2zUd+BlNCZXjupCPH1OeBQWnjOvJRj6NzldwKlJwTW8QWQ9lG2NXt4o7l UrpCN+mJEE56X59HGTcWhvkM4QssQ20RuiVRwCqjEzSUcs/Qd5lj+YVHhcJBXa9f clgQWlCVuhp0N/RvjY7ah2w0NKiD1VPdcJJNhHrQfKsqfa2MdNRJ0NBmndQhMSs+ E/FBojmhwf0ASmFbclAR2VsZTp586iQt4jGWBDzOCVGteOEBLLLr4tailWo9U8yu GIReFSyII161gXtpe0mB+J5DwZdFHjlqjR6vwlOqQ0O2TsuAA68bDUQCO1DnsxYr cJ3XF2z05WqqKUEFvPkRtC3CAYBQmR/SJN3Ur7f305zGc+I= =GVq2 -----END PGP SIGNATURE----- --dcoushr4ixzfhm7k--