From patchwork Tue Apr 19 08:34:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Shevchenko Andriy (EXT-Teleca/Helsinki)" X-Patchwork-Id: 91936 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0F194B6F29 for ; Tue, 19 Apr 2011 18:36:38 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QC6Of-0008S8-0U; Tue, 19 Apr 2011 08:34:57 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1QC6Od-00037a-7F; Tue, 19 Apr 2011 08:34:55 +0000 Received: from smtp.nokia.com ([147.243.1.48] helo=mgw-sa02.nokia.com) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QC6OZ-00037H-UU for linux-mtd@lists.infradead.org; Tue, 19 Apr 2011 08:34:52 +0000 Received: from nokia.com (localhost [127.0.0.1]) by mgw-sa02.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id p3J8Yl8B001778; Tue, 19 Apr 2011 11:34:47 +0300 Received: from fs-test.research.nokia.com ([esdhcp05135.research.nokia.com [172.21.51.35]]) by mgw-sa02.nokia.com with ESMTP id p3J8YUE7001634 ; Tue, 19 Apr 2011 11:34:31 +0300 Received: by fs-test.research.nokia.com (Postfix, from userid 1001) id A3234CE179; Tue, 19 Apr 2011 11:34:43 +0300 (EEST) From: Andy Shevchenko To: Artem Bityutskiy , linux-mtd@lists.infradead.org, Mike Frysinger Subject: [PATCHv3 3/3] serve_image: adjust classifier and type for printf Date: Tue, 19 Apr 2011 11:34:41 +0300 Message-Id: <158e520ae5748a6e32eeefad99dea0395dd4c2a7.1303202005.git.ext-andriy.shevchenko@nokia.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <82d06f0b9f3ad538d5a8dabfce6ac8337e07b0ae.1303202005.git.ext-andriy.shevchenko@nokia.com> In-Reply-To: <971bada1c870aa0baf6e8d07784f95e31bb98213.1303202005.git.ext-andriy.shevchenko@nokia.com> References: <1303195429.2779.2.camel@localhost> <971bada1c870aa0baf6e8d07784f95e31bb98213.1303202005.git.ext-andriy.shevchenko@nokia.com> <82d06f0b9f3ad538d5a8dabfce6ac8337e07b0ae.1303202005.git.ext-andriy.shevchenko@nokia.com> References: <971bada1c870aa0baf6e8d07784f95e31bb98213.1303202005.git.ext-andriy.shevchenko@nokia.com> X-Nokia-AV: Clean X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110419_043452_267183_567EA583 X-CRM114-Status: GOOD ( 10.88 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 TVD_RCVD_SPACE_BRACKET TVD_RCVD_SPACE_BRACKET -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [147.243.1.48 listed in list.dnswl.org] Cc: Andy Shevchenko X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The argument type of printf is __off64_t, meanwhile the classifier is "%ld". We agreed to use PRIu64 in such case. Signed-off-by: Andy Shevchenko --- serve_image.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/serve_image.c b/serve_image.c index f8f28a1..0e7980f 100644 --- a/serve_image.c +++ b/serve_image.c @@ -2,7 +2,6 @@ #define _POSIX_C_SOURCE 199309 #include - #include #include #include @@ -18,6 +17,8 @@ #include #include #include +#include + #include "mcast_image.h" int tx_rate = 80000; @@ -126,8 +127,8 @@ int main(int argc, char **argv) } if (st.st_size % erasesize) { - fprintf(stderr, "Image size %ld bytes is not a multiple of erasesize %d bytes\n", - st.st_size, erasesize); + fprintf(stderr, "Image size %" PRIu64 " bytes is not a multiple of " + "erasesize %d bytes\n", st.st_size, erasesize); exit(1); } image = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, rfd, 0);