From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CE40215803E for ; Tue, 2 Jan 2024 16:28:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 064FF2BC01E; Tue, 2 Jan 2024 16:28:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D759E2BC01E for ; Tue, 2 Jan 2024 16:28:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E751633FE49 for ; Tue, 2 Jan 2024 16:28:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 82E71AC2 for ; Tue, 2 Jan 2024 16:28:35 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1704212870.b49fe5088ca8f1fa0191a85e933ec213928449bc.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: dumpelf.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: b49fe5088ca8f1fa0191a85e933ec213928449bc X-VCS-Branch: master Date: Tue, 2 Jan 2024 16:28:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0bf7a93c-3723-4b78-a8c4-68c8f2194e85 X-Archives-Hash: 7f7dda03cfceb0189973192dabb9ed0d commit: b49fe5088ca8f1fa0191a85e933ec213928449bc Author: Mike Frysinger chromium org> AuthorDate: Tue Jan 2 16:27:50 2024 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Jan 2 16:27:50 2024 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=b49fe508 dumpelf: use explicit 64-bit to display off_t There's no guarantee that %j (uintmax_t) is large enough to handle off_t. Signed-off-by: Mike Frysinger chromium.org> Signed-off-by: Mike Frysinger gentoo.org> dumpelf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dumpelf.c b/dumpelf.c index de9a563..1a469ea 100644 --- a/dumpelf.c +++ b/dumpelf.c @@ -40,9 +40,9 @@ static void dumpelf(const elfobj *elf, size_t file_cnt) "\n" "/*\n" " * ELF dump of '%s'\n" - " * %ji (0x%jX) bytes\n" + " * %" PRIi64 " (0x%" PRIX64 ") bytes\n" " */\n\n", - elf->filename, elf->len, elf->len); + elf->filename, (int64_t)elf->len, (uint64_t)elf->len); /* setup the struct to namespace this elf */ #define MAKE_STRUCT(B) \