lkml.org 
[lkml]   [2012]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] ubifs: Fix build warning
From
On Mon, Jun 25, 2012 at 1:15 PM, Randy Dunlap <rdunlap@xenotime.net> wrote:
> On 06/25/2012 08:19 AM, Alexandre Pereira da Silva wrote:
>
>> Fix:
>> fs/ubifs/dir.c: In function 'ubifs_rename':
>> fs/ubifs/dir.c:972:15: warning: 'saved_nlink' may be used uninitialized
>> in this function
>>
>> Initilize saved_nlink to 0
>
> Does nlink need to be init at all?  is the warning bogus or valid?

From the code, this is a bogus warning.

> If the warning is bogus, the preferred solution is:
>
> #include <linux/compiler-gcc.h>
> ...
>        unsigned int uninitialized_var(nlink);

I will fix the patch as suggested. Thanks.
--
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: 2012-06-25 21:01    [W:0.069 / U:1.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site