From owner-dev-commits-src-branches@freebsd.org Mon Sep 6 13:43:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 2B36667538D; Mon, 6 Sep 2021 13:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H38kB0527z3JP4; Mon, 6 Sep 2021 13:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D74171FF11; Mon, 6 Sep 2021 13:43:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 186DhTgI092520; Mon, 6 Sep 2021 13:43:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 186DhTL4092519; Mon, 6 Sep 2021 13:43:29 GMT (envelope-from git) Date: Mon, 6 Sep 2021 13:43:29 GMT Message-Id: <202109061343.186DhTL4092519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 2ea6ae7cc814 - stable/12 - Fix -Wformat errors in pfctl on 32-bit architectures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2ea6ae7cc8146d2c05e266f80f00d35e9dc6dc24 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2021 13:43:30 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2ea6ae7cc8146d2c05e266f80f00d35e9dc6dc24 commit 2ea6ae7cc8146d2c05e266f80f00d35e9dc6dc24 Author: Dimitry Andric AuthorDate: 2021-08-29 15:31:28 +0000 Commit: Kristof Provost CommitDate: 2021-09-06 13:43:03 +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 (cherry picked from commit 5b8f07b12f8477f1679013d6b3abdab8d33c7243) --- sbin/pfctl/pfctl_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 5ffb006df8a0..7e48acd2e26c 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -578,7 +578,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) printf("%-27s %14s %16s\n", "State Table", "Total", "Rate"); printf(" %-25s %14" PRIu64 " %14s\n", "current entries", s->states, ""); TAILQ_FOREACH(c, &s->fcounters, entry) { - printf(" %-25s %14lu ", c->name, c->counter); + printf(" %-25s %14" PRIu64 " ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -590,7 +590,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) printf(" %-25s %14" PRIu64 " %14s\n", "current entries", s->src_nodes, ""); TAILQ_FOREACH(c, &s->scounters, entry) { - printf(" %-25s %14lu ", c->name, c->counter); + printf(" %-25s %14" PRIu64 " ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime);