From patchwork Thu Dec 15 08:56:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 131534 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 16AD1100940 for ; Thu, 15 Dec 2011 19:57:27 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8AB902837E; Thu, 15 Dec 2011 09:57:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AiOIX3WXC+UA; Thu, 15 Dec 2011 09:57:19 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5884428371; Thu, 15 Dec 2011 09:57:12 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1F2BA28365 for ; Thu, 15 Dec 2011 09:57:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EZBnXWqMbvtR for ; Thu, 15 Dec 2011 09:57:08 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by theia.denx.de (Postfix) with ESMTPS id A327C28366 for ; Thu, 15 Dec 2011 09:57:08 +0100 (CET) Received: by eaad1 with SMTP id d1so1607509eaa.3 for ; Thu, 15 Dec 2011 00:57:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:mime-version:content-type :content-transfer-encoding; bh=gNTOCsF2ppLMrvN3tr6fLM09rrcmgxZ1sSU+6nyxugs=; b=hNaoQ6mMeDcLfeFIFf2g7k83UfDefvmQ6WHcNP7qnFI5aBzEgcp+TWtmBF79Q66Kb2 fYet1sHpaUdTqIOlfYhQwsj6zn2G+cyCVMAC+T+8S4j31+nIChW2ZyV2dgKvq272ALqm seIqLvOLrKrDCG/OqVejrRApBONI+u9ekkOMc= Received: by 10.204.152.208 with SMTP id h16mr535156bkw.15.1323939428212; Thu, 15 Dec 2011 00:57:08 -0800 (PST) Received: from azuregos.er.corscience.de (DSL01.212.114.252.242.ip-pool.NEFkom.net. [212.114.252.242]) by mx.google.com with ESMTPS id fg16sm12543540bkb.16.2011.12.15.00.57.07 (version=SSLv3 cipher=OTHER); Thu, 15 Dec 2011 00:57:07 -0800 (PST) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: u-boot@lists.denx.de Date: Thu, 15 Dec 2011 09:56:53 +0100 Message-Id: <1323939415-21743-2-git-send-email-andreas.devel@googlemail.com> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1323939415-21743-1-git-send-email-andreas.devel@googlemail.com> References: <1323939415-21743-1-git-send-email-andreas.devel@googlemail.com> In-Reply-To: <1323857047-11574-1-git-send-email-andreas.devel@googlemail.com> References: <1323857047-11574-1-git-send-email-andreas.devel@googlemail.com> MIME-Version: 1.0 Cc: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Subject: [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Andreas Bießmann size_t is not always 'unsigned int', use corret length modifer. This patch fixes following warning: ---8<--- cmd_sf.c: In function 'spi_flash_update_block': cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t' cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t' --->8--- Signed-off-by: Andreas Bießmann cc: Mike Frysinger cc: Thomas Chou Acked-by: Mike Frysinger --- changes since v1: split off into single patches total: 0 errors, 0 warnings, 14 lines checked NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE 0001-cmd_sf.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission. common/cmd_sf.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_sf.c b/common/cmd_sf.c index 7225656..612fd18 100644 --- a/common/cmd_sf.c +++ b/common/cmd_sf.c @@ -127,12 +127,12 @@ static int do_spi_flash_probe(int argc, char * const argv[]) static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset, size_t len, const char *buf, char *cmp_buf, size_t *skipped) { - debug("offset=%#x, sector_size=%#x, len=%#x\n", + debug("offset=%#x, sector_size=%#x, len=%#zx\n", offset, flash->sector_size, len); if (spi_flash_read(flash, offset, len, cmp_buf)) return "read"; if (memcmp(cmp_buf, buf, len) == 0) { - debug("Skip region %x size %x: no change\n", + debug("Skip region %x size %zx: no change\n", offset, len); *skipped += len; return NULL;