Message ID | 1465725945-12253-1-git-send-email-dev@kresin.me |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rSBTm4hc6z9t0F for <incoming@patchwork.ozlabs.org>; Sun, 12 Jun 2016 20:09:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kresin-me.20150623.gappssmtp.com header.i=@kresin-me.20150623.gappssmtp.com header.b=eYcaV5vE; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bC2Io-0005vn-5j; Sun, 12 Jun 2016 10:07:34 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bC2Il-0005um-Bb for linux-mtd@lists.infradead.org; Sun, 12 Jun 2016 10:07:32 +0000 Received: by mail-wm0-x243.google.com with SMTP id k184so8182085wme.2 for <linux-mtd@lists.infradead.org>; Sun, 12 Jun 2016 03:07:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kresin-me.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=JfWYkIyEzgytghjSa/FdRQ0d1hVodFiEwtvRAeQTWWQ=; b=eYcaV5vEImbTxb1l8nl5sFC6JO5/NXxoZA5j+SSfqdkp0Nfl4j+KCp0y6SW53vmMnd BTeuWeUYZcSaguje4i5Wkhlflv5AeV4tb3cVhsHcrZHfZl3lciGUgogF2ZL4vBLr0P1N w9ZWILIroKsj0rizvfh9K2+fUti3Ta+SMWnzrDC1bVEHGNLw4w+GU1Fgy9gFxFT3qH26 5AbIkynSzTVXn+M0SXxJW4Zzv2jRMxbhxpjsERl1vRj99ZRZobNILlbgNiIv6Tev39AU 4s/yi6k4WPAveYmlgqhze82/tFd9VmQOjIeVYfRU1tPxPoH+XtdHkvpeLpEIeOb9kJVz 1gjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=JfWYkIyEzgytghjSa/FdRQ0d1hVodFiEwtvRAeQTWWQ=; b=bYFd/+11GeHjdjwDMdCSPBKha9r8unq/pomQhbUtHDU0Wi47eQDd2ID4gVBDUKin9w 9bUqEM1b1riCayAj4IjreBhLmUF80aJQsWAP/5ruAXQfLk6IIl4oHIVd9Rb5GDw63f41 DbC+lNMlXsuvmJPFlWCAIZ1wndnwG7LgzcLuEXk+5AkIE5IX1ThAYCokoGda+nSeliia WThRN8BlGtZnGwNnm5483enuzmKN39foX4H11YBYIYcwz9iiFnvEw0z/i3YZShw8I5xL wHMYXx9zq2vAre8HBLAexJsGKXLv4UwslqEhznxX2q257desTa147OhFFoi6/4nCiLCu 3TpQ== X-Gm-Message-State: ALyK8tI/j13HVFxzITQA8Fxp3muIcJPRLLbZ7fk+z7TNJP/M/08EPcSk3Eq1c89inczkSA== X-Received: by 10.28.47.71 with SMTP id v68mr6764679wmv.49.1465726027264; Sun, 12 Jun 2016 03:07:07 -0700 (PDT) Received: from desktop.wvd.kresin.me (p5DDC653E.dip0.t-ipconnect.de. [93.220.101.62]) by smtp.gmail.com with ESMTPSA id k3sm21561026wjh.7.2016.06.12.03.07.06 for <linux-mtd@lists.infradead.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Jun 2016 03:07:06 -0700 (PDT) From: Mathias Kresin <dev@kresin.me> To: linux-mtd@lists.infradead.org Subject: [PATCH] mtd-utils: fix wrong format specifiers on mips32 Date: Sun, 12 Jun 2016 12:05:45 +0200 Message-Id: <1465725945-12253-1-git-send-email-dev@kresin.me> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160612_030731_575754_E9A2DA49 X-CRM114-Status: GOOD ( 10.23 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:243 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
diff --git a/include/common.h b/include/common.h index 8cb3142..ca4c62e 100644 --- a/include/common.h +++ b/include/common.h @@ -72,8 +72,13 @@ extern "C" { #define PRIxoff_t PRIx64 #define PRIdoff_t PRId64 #else +#if (SIZEOF_LONG >= 8) #define PRIxoff_t "l"PRIx32 #define PRIdoff_t "l"PRId32 +#else +#define PRIxoff_t "ll"PRIx32 +#define PRIdoff_t "ll"PRId32 +#endif #endif /* Verbose messages */
This patch fixes the follwing compiler warnings: flash_erase.c: In function 'show_progress': flash_erase.c:56:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'off_t {aka long long int}' [-Wformat=] bareverbose(!quiet, "\rErasing %d Kibyte @ %"PRIxoff_t" -- %2i %% complete ", ^ ./include/common.h:81:10: note: in definition of macro 'bareverbose' printf(fmt, ##__VA_ARGS__); which are linked to the following buggy numerical output: Erasing 128 Kibyte @ 0 -- 917504 % complete flash_erase: Cleanmarker written at 0 Erasing 128 Kibyte @ 0 -- 1048576 % complete flash_erase: Cleanmarker written at 0 Signed-off-by: Mathias Kresin <dev@kresin.me> --- In case it might be relevant, I'm cross compiling the mtd-utils on ubuntu 14.04 x64 using a patched GCC 5.3.0 from the lede project. The kernel version used on the mips32 target is 4.4.12. include/common.h | 5 +++++ 1 file changed, 5 insertions(+)