From nobody Mon Feb 20 22:13:27 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PLGs34Y1Tz3sGtt; Mon, 20 Feb 2023 22:13:27 +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 4PLGs343dPz3rZm; Mon, 20 Feb 2023 22:13:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676931207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eiJjiuwpiDk2FwP202GV3ix7fbBoYa/zERU6IDEPc+4=; b=h+9xKYqQYrECJOweJakMdxMxgISxZ/Sw6jo2yyizHvfO5TrTTKfZLVOaLaFxprjOxN6iI6 BLCB4DkaU/6tWhJ83lHhooJvq5JZeHk5aQCez2TfVsVVY1rq3m9aHA6Nuk5hCufwwTmJXp oistFfrhXzOIG7w/6tF4zr7hD74h44O3dwr7+/Pkc0mAFmOL9c5rgbG1kMzoEecmw6Ekwr hv5jVUlFpwTRJFyO4Bu1t+ej+5gT01k1CPLFwZablytGPvsQuT8qdXMtaiFf4N9leKD++6 VvQMdmWn9ObESV6HxsMoxT0OLNDdQRI13v0vDbUaF5nTdvvMdDYTnsU8Uy+l0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676931207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eiJjiuwpiDk2FwP202GV3ix7fbBoYa/zERU6IDEPc+4=; b=StZPyMyRV1uB+L4SltKfNo0aIKdARjBJTT16esJ8sBR4BPt3LxzyQvLNDO91bj1osAX+ke jpr9IapeFPHz4j4yDWeEIMlhbg/bVhG8g11/lV2Jp4XcdUX4K5vLMsXVxn/1B+rksCDUN6 785eRh318rQhWEDKbM7TG6ryzSf21tJuJmaKe2gHxVorGl3tu9+XR7tLZ9F0T64VnAUIPL LNzB88xHwn+pf0gPDXwTKSHWFdAX7Q+rMCKHEP39jFIDtaDK9hAAlRrsRKXngnRq5tPXso UH44Pj53kOjAHto6LSv6lbsbFu7vs01mHM68OIwBJ2HG6DPLxTzzsrulNVr8/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676931207; a=rsa-sha256; cv=none; b=LE26AiynoK2yhpw96hDKuNuygpLd4AXjGUiQVAPCmTDC3lKMfPV9zTgO6WcDm56qgyzlf3 0Nr3i1kwu4t5GOF2lulLzsOyI1D7S/5n3aG+cXOzN1Q+jgqepAdFwjNCYWscJGRuABgKVL shJnp7mYInBw8X4iMFQaOJT6WzR/xQ9MK45VKKoBlsNp8Xi8qn3sKAdhIj1gRCXLQwJ2m7 /4p1nX3EIysnkKSWtMktLPcT2Z7ISJYj7MCkCx6agoQMGdGpEr8B2iZTjbksVvX2uLRr+3 jvqKG5dDSHaUIP+JdsO9SU9QzyGAEHSKmkCBCCvLnZI/6+evMEopb9FX9/uKDA== 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 4PLGs337hGzxrV; Mon, 20 Feb 2023 22:13:27 +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 31KMDRXj067393; Mon, 20 Feb 2023 22:13:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31KMDRP9067392; Mon, 20 Feb 2023 22:13:27 GMT (envelope-from git) Date: Mon, 20 Feb 2023 22:13:27 GMT Message-Id: <202302202213.31KMDRP9067392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 7b5cb32fca26 - main - kern: physmem: properly cast %jx arguments to uintmax_t List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b5cb32fca26428b8c0df98f9c58444557f808ae Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7b5cb32fca26428b8c0df98f9c58444557f808ae commit 7b5cb32fca26428b8c0df98f9c58444557f808ae Author: Kyle Evans AuthorDate: 2023-02-20 22:11:44 +0000 Commit: Kyle Evans CommitDate: 2023-02-20 22:12:55 +0000 kern: physmem: properly cast %jx arguments to uintmax_t While we're here, slap prfunc with a __printflike to get compiler checking on args to catch silly mistakes like this. Reported by: jrtc27 --- sys/kern/subr_physmem.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c index d371e1e166c5..a53d2cb879eb 100644 --- a/sys/kern/subr_physmem.c +++ b/sys/kern/subr_physmem.c @@ -120,7 +120,7 @@ panic(const char *fmt, ...) * db_printf). */ static void -physmem_dump_tables(int (*prfunc)(const char *, ...)) +physmem_dump_tables(int (*prfunc)(const char *, ...) __printflike(1, 2)) { size_t i; int flags; @@ -149,10 +149,12 @@ physmem_dump_tables(int (*prfunc)(const char *, ...)) #ifdef DEBUG prfunc("Avail lists:\n"); for (i = 0; phys_avail[i] != 0; ++i) { - prfunc(" phys_avail[%d] 0x%08jx\n", i, phys_avail[i]); + prfunc(" phys_avail[%d] 0x%08jx\n", i, + (uintmax_t)phys_avail[i]); } for (i = 0; dump_avail[i] != 0; ++i) { - prfunc(" dump_avail[%d] 0x%08jx\n", i, dump_avail[i]); + prfunc(" dump_avail[%d] 0x%08jx\n", i, + (uintmax_t)dump_avail[i]); } #endif }