From owner-dev-commits-src-main@freebsd.org Mon Aug 30 23:33:18 2021 Return-Path: Delivered-To: dev-commits-src-main@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 DA157660881; Mon, 30 Aug 2021 23:33:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gz67x6SSZz3KDj; Mon, 30 Aug 2021 23:33:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 17UNXAgD068354 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 31 Aug 2021 02:33:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 17UNXAgD068354 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 17UNXA7q068353; Tue, 31 Aug 2021 02:33:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Aug 2021 02:33:10 +0300 From: Konstantin Belousov To: Dimitry Andric Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 5b8f07b12f84 - main - Fix -Wformat errors in pfctl on 32-bit architectures Message-ID: References: <202108291531.17TFVoah033310@gitrepo.freebsd.org> <6A084192-562D-404D-9833-51A708FA1BC0@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4Gz67x6SSZz3KDj X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-2.62 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.62)[-0.625]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2021 23:33:18 -0000 On Sun, Aug 29, 2021 at 07:40:09PM +0200, Dimitry Andric wrote: > On 29 Aug 2021, at 18:00, Kristof Provost wrote: > > > > On 29 Aug 2021, at 17:31, Dimitry Andric wrote: > >> The branch main has been updated by dim: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=5b8f07b12f8477f1679013d6b3abdab8d33c7243 > >> > >> commit 5b8f07b12f8477f1679013d6b3abdab8d33c7243 > >> Author: Dimitry Andric > >> AuthorDate: 2021-08-29 15:31:28 +0000 > >> Commit: Dimitry Andric > >> CommitDate: 2021-08-29 15:31:28 +0000 > >> > >> Fix -Wformat errors in pfctl on 32-bit architectures > >> > >> 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. > >> > >> Fixes: 80078d9d38fd > >> MFC after: 1 week > > > > Thanks! > > > > I was running test builds for a fix, but it is so much more convenient when other people fix my mistakes for me. > > 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. :) 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.