lkml.org 
[lkml]   [2016]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch] Squashfs: silence some uninitialized variable warnings
Hi Dan

On Wed, Jul 13, 2016 at 12:02 PM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> We print these values in the TRACE() code before we check that
> fill_meta_index() was successful. It makes my static checker complain.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/fs/squashfs/file.c b/fs/squashfs/file.c
> index 13d8094..46679e2 100644
> --- a/fs/squashfs/file.c
> +++ b/fs/squashfs/file.c
> @@ -334,9 +334,9 @@ failed:
> */
> static int read_blocklist(struct inode *inode, int index, u64 *block)
> {
> - u64 start;
> + u64 start = -1;

Do you assign the negative value to the unsigned variable here on purpose?


Cheers,

Silvan

\
 
 \ /
  Last update: 2016-07-13 14:01    [W:0.041 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site