lkml.org 
[lkml]   [2004]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[Compile Regression in 2.4.25-pre8][PATCH 31/42]

mptbase.c:2906: warning: `pCached' might be used uninitialized in this function

Initialize pCached to NULL.
Avoid printing if pCached is NULL.

diff -Nru -X dontdiff linux-2.4-vanilla/drivers/message/fusion/mptbase.c linux-2.4/drivers/message/fusion/mptbase.c
--- linux-2.4-vanilla/drivers/message/fusion/mptbase.c Sat Jan 31 15:54:42 2004
+++ linux-2.4/drivers/message/fusion/mptbase.c Sat Jan 31 21:34:47 2004
@@ -2903,7 +2903,7 @@
{
MpiFwHeader_t *FwHdr;
MpiExtImageHeader_t *ExtHdr;
- fw_image_t **pCached;
+ fw_image_t **pCached = NULL;
int fw_sz;
u32 diag0val;
#ifdef MPT_DEBUG
@@ -2944,11 +2944,11 @@
pCached = (fw_image_t **)ioc->cached_fw;
else if (ioc->alt_ioc && (ioc->alt_ioc->cached_fw != NULL))
pCached = (fw_image_t **)ioc->alt_ioc->cached_fw;
-
- ddlprintk((MYIOC_s_INFO_FMT "DbGb2: FW Image @ %p\n",
- ioc->name, pCached));
if (!pCached)
return -2;
+
+ ddlprintk((MYIOC_s_INFO_FMT "DbGb2: FW Image @ %p\n",
+ ioc->name, pCached));

/* Write magic sequence to WriteSequence register
* until enter diagnostic mode
--
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
Runtime error 6D at f000:a12f : user incompetente
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [from the cache]
©2003-2011 Jasper Spaans