[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070716200357.15dd8c64.akpm@linux-foundation.org>
Date: Mon, 16 Jul 2007 20:03:57 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Jeff Garzik <jeff@...zik.org>
Cc: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
Jens Axboe <jens.axboe@...cle.com>,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: block/bsg.c
On Mon, 16 Jul 2007 21:47:21 -0400 Jeff Garzik <jeff@...zik.org> wrote:
> hrm. uninitialized_var(x) does not silence the warning, on my compiler:
>
> [jgarzik@...tzel misc-2.6]$ rpm -q gcc
> gcc-4.1.2-13.fc6
>
> @@ -1358,6 +1358,8 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr
> {
> kernel_lb_addr ino;
> + uninitialized_var(ino.partitionReferenceNum);
> +
> if (!UDF_SB_LASTBLOCK(sb))
[erk, wordwrapping!]
> still yields
>
> fs/udf/super.c: In function ‘udf_fill_super’:
> fs/udf/super.c:1359: warning: ‘ino.partitionReferenceNum’ may be used
> uninitialized in this function
>
We use it as
- int foo;
+ int uninitialized_var(foo);
so what you have is effectively
kernel_lb_addr ino;
ino.partitionReferenceNum = ino.partitionReferenceNum;
so it still warns.
Hopefully this will work:
kernel_lb_addr uninitialized_var(ino);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists