fs warning fixes
PATCH 1/1 fs warning fixes
This patch gets rid of two uninitialized variable warnings by initializing idx in fs/bio.c and fd in fs/eventpoll.c; both of these are initialized through pointers later on.
fs/bio.c +1 -1
@@ -166,7 +166,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mbio_init (bio);if (likely (nr_iovecs)) { -unsigned long idx; +unsigned long idx =0 ; bvl =bvec_alloc_bs (gfp_mask, nr_iovecs, &idx, bs);if (unlikely (!bvl)) {
fs/eventpoll.c +1 -1
@@ -497,7 +497,7 @@ void eventpoll_release_file(struct file*/ asmlinkage long sys_epoll_create (int size) { -int error, fd; +int error, fd =0 ;struct eventpoll *ep;struct inode *inode;struct file *file;
Quoted 6 lines · Ameer Armaly
This patch gets rid of two uninitialized variable warnings by initializing idx in
fs/bio.cand fd infs/eventpoll.c; both of these are initialized through pointers later on.fs/bio.c +1
-1-unsigned long idx; +unsigned long idx =0 ;
[...]
fs/eventpoll.c void eventpoll_release_file(struct file · line 500
Quoted 2 lines
fs/eventpoll.c +1
-1-int error, fd; +int error, fd =0 ;
Please don't do this unless it really is fixing a bug. gcc false warnings are not kernel bugs.