From patchwork Thu Sep 8 12:10:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 113895 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 824B8B6F94 for ; Thu, 8 Sep 2011 22:11:26 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E97452820C; Thu, 8 Sep 2011 14:10:56 +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 57GwKtJ8LxLq; Thu, 8 Sep 2011 14:10:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 60CF9281E0; Thu, 8 Sep 2011 14:10:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 599A728169 for ; Thu, 8 Sep 2011 14:10:31 +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 VS+EHO6Aakdc for ; Thu, 8 Sep 2011 14:10:28 +0200 (CEST) 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-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTP id D684A281C7 for ; Thu, 8 Sep 2011 14:10:25 +0200 (CEST) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3E4AF18015B1 for ; Thu, 8 Sep 2011 14:10:25 +0200 (CEST) X-Auth-Info: tc2rjWTYEgtSSkqKTYWGj02w3EZDo/M7PZ3NdDvskYo= Received: from diddl.denx.de (host-80-81-18-216.customer.m-online.net [80.81.18.216]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 753391C001E8 for ; Thu, 8 Sep 2011 14:10:25 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id 52CC0C000A96 for ; Thu, 8 Sep 2011 14:10:25 +0200 (CEST) Received: by gemini.denx.de (Postfix, from userid 500) id 3B41C140875B; Thu, 8 Sep 2011 14:10:25 +0200 (CEST) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Thu, 8 Sep 2011 14:10:22 +0200 Message-Id: <1315483822-25399-7-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1315483822-25399-1-git-send-email-wd@denx.de> References: <1315483822-25399-1-git-send-email-wd@denx.de> Subject: [U-Boot] [PATCH 6/6] YAFFS2: fs/yaffs2/yaffs_guts.c - fix build warnings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Fix these: yaffs_guts.c: In function 'yaffs_ReadDataFromFile': yaffs_guts.c:4622: warning: pointer targets in passing argument 3 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c:4622: warning: pointer targets in passing argument 4 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c: In function 'yaffs_WriteDataToFile': yaffs_guts.c:4745: warning: pointer targets in passing argument 3 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c:4745: warning: pointer targets in passing argument 4 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c: In function 'yaffs_ResizeFile': yaffs_guts.c:4968: warning: pointer targets in passing argument 3 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c:4968: warning: pointer targets in passing argument 4 of 'yaffs_AddrToChunk' differ in signedness yaffs_guts.c: In function 'yaffs_GutsInitialise': yaffs_guts.c:7235: warning: assignment from incompatible pointer type yaffs_guts.c: In function 'yaffs_CreateNewObject': yaffs_guts.c:2143: warning: 'tn' may be used uninitialized in this function yaffs_guts.c: In function 'yaffs_MknodObject': yaffs_guts.c:2258: warning: 'str' may be used uninitialized in this function Signed-off-by: Wolfgang Denk --- fs/yaffs2/yaffs_guts.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c index fc86a5c..c67a085 100644 --- a/fs/yaffs2/yaffs_guts.c +++ b/fs/yaffs2/yaffs_guts.c @@ -2140,7 +2140,7 @@ yaffs_Object *yaffs_CreateNewObject(yaffs_Device * dev, int number, { yaffs_Object *theObject; - yaffs_Tnode *tn; + yaffs_Tnode *tn = NULL; if (number < 0) { number = yaffs_CreateNewObjectNumber(dev); @@ -2255,7 +2255,7 @@ static yaffs_Object *yaffs_MknodObject(yaffs_ObjectType type, const YCHAR * aliasString, __u32 rdev) { yaffs_Object *in; - YCHAR *str; + YCHAR *str = NULL; yaffs_Device *dev = parent->myDev; @@ -4605,8 +4605,8 @@ int yaffs_ReadDataFromFile(yaffs_Object * in, __u8 * buffer, loff_t offset, int nBytes) { - int chunk; - int start; + __u32 chunk; + __u32 start; int nToCopy; int n = nBytes; int nDone = 0; @@ -4725,8 +4725,8 @@ int yaffs_WriteDataToFile(yaffs_Object * in, const __u8 * buffer, loff_t offset, int nBytes, int writeThrough) { - int chunk; - int start; + __u32 chunk; + __u32 start; int nToCopy; int n = nBytes; int nDone = 0; @@ -4960,8 +4960,8 @@ int yaffs_ResizeFile(yaffs_Object * in, loff_t newSize) { int oldFileSize = in->variant.fileVariant.fileSize; - int newSizeOfPartialChunk; - int newFullChunks; + __u32 newSizeOfPartialChunk; + __u32 newFullChunks; yaffs_Device *dev = in->myDev; @@ -7232,7 +7232,8 @@ int yaffs_GutsInitialise(yaffs_Device * dev) dev->nShortOpCaches = YAFFS_MAX_SHORT_OP_CACHES; } - buf = dev->srCache = YMALLOC(srCacheBytes); + dev->srCache = YMALLOC(srCacheBytes); + buf = (__u8 *)dev->srCache; if(dev->srCache) memset(dev->srCache,0,srCacheBytes);