linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/1] Fix misleading gcc4 warning, idx may be used uninitialized
@ 2005-06-20 21:56 domen
  2005-06-21  7:07 ` Jörn Engel
  2005-06-21  7:14 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: domen @ 2005-06-20 21:56 UTC (permalink / raw)
  To: axboe; +Cc: linux-fsdevel, Jesse Millan, domen

[-- Attachment #1: gcc4-fs_bio.c --]
[-- Type: text/plain, Size: 638 bytes --]

From: Jesse Millan <jessem@cs.pdx.edu>



This warning is a false alarm.

This patch eliminates the warning that idx may be used uninitialized in
the function bvec_alloc_bs().


Signed-off-by: Jesse Millan <jessem@cs.pdx.edu>
Signed-off-by: Domen Puncer <domen@coderock.org>

---
 bio.c |    1 +
 1 files changed, 1 insertion(+)

Index: quilt/fs/bio.c
===================================================================
--- quilt.orig/fs/bio.c
+++ quilt/fs/bio.c
@@ -78,6 +78,7 @@ static inline struct bio_vec *bvec_alloc
 {
 	struct bio_vec *bvl;
 	struct biovec_slab *bp;
+	*idx = 0;
 
 	/*
 	 * see comment near bvec_array define!

--

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 1/1] Fix misleading gcc4 warning, idx may be used uninitialized
  2005-06-20 21:56 [patch 1/1] Fix misleading gcc4 warning, idx may be used uninitialized domen
@ 2005-06-21  7:07 ` Jörn Engel
  2005-06-21  7:14 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jörn Engel @ 2005-06-21  7:07 UTC (permalink / raw)
  To: domen; +Cc: axboe, linux-fsdevel, Jesse Millan

On Mon, 20 June 2005 23:56:48 +0200, domen@coderock.org wrote:
> 
> This warning is a false alarm.

Yep, it is.  Would be much nicer to teach gcc about it.


Jörn

-- 
"Translations are and will always be problematic. They inflict violence 
upon two languages." (translation from German)
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 1/1] Fix misleading gcc4 warning, idx may be used uninitialized
  2005-06-20 21:56 [patch 1/1] Fix misleading gcc4 warning, idx may be used uninitialized domen
  2005-06-21  7:07 ` Jörn Engel
@ 2005-06-21  7:14 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2005-06-21  7:14 UTC (permalink / raw)
  To: domen; +Cc: linux-fsdevel, Jesse Millan

On Mon, Jun 20 2005, domen@coderock.org wrote:
> From: Jesse Millan <jessem@cs.pdx.edu>
> 
> 
> 
> This warning is a false alarm.
> 
> This patch eliminates the warning that idx may be used uninitialized in
> the function bvec_alloc_bs().
> 
> 
> Signed-off-by: Jesse Millan <jessem@cs.pdx.edu>
> Signed-off-by: Domen Puncer <domen@coderock.org>
> 
> ---
>  bio.c |    1 +
>  1 files changed, 1 insertion(+)
> 
> Index: quilt/fs/bio.c
> ===================================================================
> --- quilt.orig/fs/bio.c
> +++ quilt/fs/bio.c
> @@ -78,6 +78,7 @@ static inline struct bio_vec *bvec_alloc
>  {
>  	struct bio_vec *bvl;
>  	struct biovec_slab *bp;
> +	*idx = 0;
>  
>  	/*
>  	 * see comment near bvec_array define!

Rejected, the gcc warning is (as you note) a false alarm. So fix gcc.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-21  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-20 21:56 [patch 1/1] Fix misleading gcc4 warning, idx may be used uninitialized domen
2005-06-21  7:07 ` Jörn Engel
2005-06-21  7:14 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).