Re: [PATCH] fuse: mark variables uninitialized

From: Miklos Szeredi
Date: Tue Aug 28 2012 - 09:04:11 EST


On Tue, 2012-08-28 at 10:38 +0200, Daniel Mack wrote:
> gcc 4.6.3 complains about uninitialized variables in fs/fuse/control.c:
>
> CC fs/fuse/control.o
> fs/fuse/control.c: In function âfuse_conn_congestion_threshold_writeâ:
> fs/fuse/control.c:165:29: warning: âvalâ may be used uninitialized in this function [-Wuninitialized]
> fs/fuse/control.c: In function âfuse_conn_max_background_writeâ:
> fs/fuse/control.c:128:23: warning: âvalâ may be used uninitialized in this function [-Wuninitialized]
>
> fuse_conn_limit_write() will always return non-zero unless the &val
> is modified, so the warning is misleading. Let the compiler know
> about it by marking 'val' with 'uninitialized_var'.

Thanks, applied.

Miklos


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/