From owner-dev-commits-src-all@freebsd.org Tue Aug 31 09:03:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1149B6692B2; Tue, 31 Aug 2021 09:03:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GzLnj6t8Qz3Fnh; Tue, 31 Aug 2021 09:03:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id B6F23A13C; Tue, 31 Aug 2021 09:03:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (unknown [IPv6:2001:470:7a58:0:44b7:a7ee:5a9b:104b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 77C0F60148; Tue, 31 Aug 2021 11:03:19 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_AD4B321B-6CB0-400A-9AB8-B866D4047995"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: git: 5b8f07b12f84 - main - Fix -Wformat errors in pfctl on 32-bit architectures Date: Tue, 31 Aug 2021 11:03:12 +0200 In-Reply-To: Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Konstantin Belousov References: <202108291531.17TFVoah033310@gitrepo.freebsd.org> <6A084192-562D-404D-9833-51A708FA1BC0@FreeBSD.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 09:03:22 -0000 --Apple-Mail=_AD4B321B-6CB0-400A-9AB8-B866D4047995 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 31 Aug 2021, at 01:33, Konstantin Belousov = wrote: >=20 > On Sun, Aug 29, 2021 at 07:40:09PM +0200, Dimitry Andric wrote: >> On 29 Aug 2021, at 18:00, Kristof Provost wrote: >>>=20 >>> On 29 Aug 2021, at 17:31, Dimitry Andric wrote: >>>> The branch main has been updated by dim: >>>>=20 >>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5b8f07b12f8477f1679013d6b3abdab8= d33c7243 >>>>=20 >>>> commit 5b8f07b12f8477f1679013d6b3abdab8d33c7243 >>>> Author: Dimitry Andric >>>> AuthorDate: 2021-08-29 15:31:28 +0000 >>>> Commit: Dimitry Andric >>>> CommitDate: 2021-08-29 15:31:28 +0000 >>>>=20 >>>> Fix -Wformat errors in pfctl on 32-bit architectures >>>>=20 >>>> Use PRIu64 to printf(3) uint64_t quantities, otherwise this will = result >>>> in "error: format specifies type 'unsigned long' but the argument = has >>>> type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]" on = 32-bit >>>> architectures. >>>>=20 >>>> Fixes: 80078d9d38fd >>>> MFC after: 1 week >>>=20 >>> Thanks! >>>=20 >>> I was running test builds for a fix, but it is so much more = convenient when other people fix my mistakes for me. >>=20 >> I was trying buildworld on i386 for something totally unrelated, and = ran >> into these -Wformat errors so I took the liberty of patching them up >> quickly. :) >=20 > Generally we do not use the PRIu64 (you should remember the term > abomination). Why not cast to uintmax_t and use %ju as we typically = do > in other places. I personally see nothing wrong with PRIu64, but in this case I just copied the existing coding style. -Dimitry --Apple-Mail=_AD4B321B-6CB0-400A-9AB8-B866D4047995 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYS3wUQAKCRCwXqMKLiCW o32ZAJ0R0CXtW9iGIuvbpwsW4vl/aemnxwCffLbVXqqM9wOVwonxgBSZp5LNfZM= =iqsy -----END PGP SIGNATURE----- --Apple-Mail=_AD4B321B-6CB0-400A-9AB8-B866D4047995--