From patchwork Sat Jan 6 00:47:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 856280 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zD2vK3Cmtz9sNc for ; Sat, 6 Jan 2018 11:47:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="BCpzvXmX"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zD2vK1bfVzF0S3 for ; Sat, 6 Jan 2018 11:47:57 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="BCpzvXmX"; dkim-atps=neutral X-Original-To: Petitboot@lists.ozlabs.org Delivered-To: Petitboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=geoff@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="BCpzvXmX"; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zD2v864FfzF0Rq for ; Sat, 6 Jan 2018 11:47:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Date:Cc:To:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:From:References:In-Reply-To:Message-Id: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pitf5EqFr6j7BlUK9auMvMa11fXpV2FiFzObQqH95BI=; b=BCpzvXmXH0hWWAAuHU6w+ttuNh bpEkH7Y6zQKRw2ylF5yT49sFbuZgOZth6kf9SLrMnZkTpYKSl/US5W71/xELEpBP5vLWRn7QZF4z5 3+assVQhLCLWzzysmq2uguCLht5VAP+nk9VFJRxSWj9TB+EGnxLpIWPdmBwxi2BlAPGTkgQQEKRlc 8zyE4co4OgmdhY/InfrsSf1sjPZFBbjPnscYm8QRlCp+iPJK1U48ZGFgmmGk1xYaiwV0AA0rnvlHF 1pj+0/N4OnFjlpDMGePotHz/owytcfmDPWmpNmxHvKK8sa+UxxnU5lEMbtPtIcst5NtxjN4mUrF+8 XdjuyBWQ==; Received: from geoff by merlin.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1eXceB-00062z-Sq; Sat, 06 Jan 2018 00:47:39 +0000 Message-Id: <12bc8d4842d2ecc6cf9da62c2faa83ca6e20a176.1515199383.git.geoff@infradead.org> In-Reply-To: References: From: Geoff Levand Patch-Date: Fri, 5 Jan 2018 16:38:19 -0800 Subject: [PATCH v1 4/4] printf: Fix format type warnings MIME-Version: 1.0 To: Samuel Mendoza-Jonas Date: Sat, 06 Jan 2018 00:47:39 +0000 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petitboot@lists.ozlabs.org Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" Fixes build warnings like these when building 32 bit programs: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument has type ‘uint64_t’ Signed-off-by: Geoff Levand --- discover/device-handler.c | 3 ++- discover/devmapper.c | 3 ++- utils/hooks/30-dtb-updates.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/discover/device-handler.c b/discover/device-handler.c index 8223015..7a570f9 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -653,7 +654,7 @@ void device_handler_status_download(struct device_handler *handler, unit++; } update = talloc_asprintf(handler, - _("%u %s downloading: %.0f%% - %lu%cB"), + _("%u %s downloading: %.0f%% - %" PRIu64 "%cB"), handler->n_progress, ngettext("item", "items", handler->n_progress), (current / total) * 100, current_converted, diff --git a/discover/devmapper.c b/discover/devmapper.c index 2b28e0f..d8445e6 100644 --- a/discover/devmapper.c +++ b/discover/devmapper.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include @@ -231,7 +232,7 @@ static int run_create_task(const char *dm_name, const struct target *target) struct dm_task *task; uint32_t cookie; - pb_debug("%s: %lu %lu '%s' '%s'\n", __func__, + pb_debug("%s: %" PRIu64 " %" PRIu64 " '%s' '%s'\n", __func__, target->start_sector, target->end_sector, target->ttype, target->params); diff --git a/utils/hooks/30-dtb-updates.c b/utils/hooks/30-dtb-updates.c index e161d87..f7de976 100644 --- a/utils/hooks/30-dtb-updates.c +++ b/utils/hooks/30-dtb-updates.c @@ -257,7 +257,7 @@ static int do_translate(void *fdt, int node, current_pci_flags = na > 2 ? of_read_number(addr, 1) : 0; child_pci_flags = cna > 2 ? of_read_number(ranges, 1) : 0; if (current_pci_flags != 0 && current_pci_flags != child_pci_flags) { - fprintf(stderr, "Unexpected change in flags: %lx, %lx\n", + fprintf(stderr, "Unexpected change in flags: %" PRIu64 ", %" PRIu64 "\n", current_pci_flags, child_pci_flags); return -1; } @@ -324,7 +324,7 @@ static int do_translate(void *fdt, int node, fprintf(stderr, "New address:\n\t"); for (i = 0; i < *addr_cells; i++) - fprintf(stderr, " %lx ", of_read_number(&addr[i], 1)); + fprintf(stderr, " %" PRIu64 " ", of_read_number(&addr[i], 1)); fprintf(stderr, "\n"); return 0; @@ -382,7 +382,7 @@ static int create_translated_addresses(struct offb_ctx *ctx, fprintf(stderr, "Final address:\n\t"); for (i = 0; i < addr_cells; i++) - fprintf(stderr, " %lx ", of_read_number(&addr[i], 1)); + fprintf(stderr, " %" PRIu64 " ", of_read_number(&addr[i], 1)); fprintf(stderr, "\n"); if (addr_cells + size_cells > reg_cells) {