From patchwork Tue Sep 3 02:38:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Chou X-Patchwork-Id: 272102 X-Patchwork-Delegate: thomas@wytron.com.tw 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 9F3F62C0091 for ; Tue, 3 Sep 2013 12:39:55 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 342A24A062; Tue, 3 Sep 2013 04:39:42 +0200 (CEST) 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 zr1d8PYOvgbr; Tue, 3 Sep 2013 04:39:42 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7F7924A064; Tue, 3 Sep 2013 04:39:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 65B374A064 for ; Tue, 3 Sep 2013 04:39:28 +0200 (CEST) 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 2OCkkR4bpHrY for ; Tue, 3 Sep 2013 04:39:23 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from www.wytron.com.tw (www.wytron.com.tw [211.75.82.101]) by theia.denx.de (Postfix) with ESMTP id 897AB4A062 for ; Tue, 3 Sep 2013 04:39:08 +0200 (CEST) Received: from darkstar.wytron.com.tw (unknown [192.168.1.5]) by www.wytron.com.tw (Postfix) with ESMTP id 2B920D00354; Tue, 3 Sep 2013 10:38:49 +0800 (CST) From: Thomas Chou To: u-boot@lists.denx.de Date: Tue, 3 Sep 2013 10:38:35 +0800 Message-Id: <1378175915-28288-1-git-send-email-thomas@wytron.com.tw> X-Mailer: git-send-email 1.8.3.1 Cc: Tom Rini Subject: [U-Boot] [PATCH] nios2: change size_t to fix format warning for gcc 4.7.3 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The gcc-4.7.3 in lastest nios2 toolchain generated lots of warning on type mismatch. So change typedef of size_t to unsigned int, followed those of arm and mips arch. spi_flash.c: In function 'spi_flash_read_write': spi_flash.c:42:3: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'long unsigned int' [-Wformat] Signed-off-by: Thomas Chou --- arch/nios2/include/asm/posix_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/nios2/include/asm/posix_types.h b/arch/nios2/include/asm/posix_types.h index 6733640..b4bf261 100644 --- a/arch/nios2/include/asm/posix_types.h +++ b/arch/nios2/include/asm/posix_types.h @@ -16,8 +16,8 @@ typedef int __kernel_pid_t; typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; -typedef unsigned long __kernel_size_t; -typedef long __kernel_ssize_t; +typedef unsigned int __kernel_size_t; +typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; typedef long __kernel_time_t; typedef long __kernel_suseconds_t;