From: vlnb Date: Mon, 4 Dec 2006 11:02:50 +0000 (+0000) Subject: From Erik Habbinga X-Git-Url: http://git.etherboot.org/mirror/scst/.git/commitdiff_plain/6257d7bf320b1dd815256eee7ba275b650b7e332 From Erik Habbinga This patch initializes the res variable in the scst_proc_update_size and fileio_proc_update_size to get rid of "variable might be used unintialized" compiler warnings. git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@41 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- diff --git a/scst/src/dev_handlers/scst_fileio.c b/scst/src/dev_handlers/scst_fileio.c index 46fcb07..500c848 100644 --- a/scst/src/dev_handlers/scst_fileio.c +++ b/scst/src/dev_handlers/scst_fileio.c @@ -2270,7 +2270,7 @@ struct fileio_proc_update_struct { static int fileio_proc_update_size(int size, off_t offset, int length, struct fileio_proc_update_struct *p, int is_start) { - int res; + int res = 0; if (size > 0) { p->len += size; p->pos = p->begin + p->len; diff --git a/scst/src/scst_proc.c b/scst/src/scst_proc.c index 580cc97..570d706 100644 --- a/scst/src/scst_proc.c +++ b/scst/src/scst_proc.c @@ -737,7 +737,7 @@ struct scst_proc_update_struct { static int scst_proc_update_size(int size, off_t offset, int length, struct scst_proc_update_struct *p) { - int res; + int res = 0; if (size > 0) { p->len += size; p->pos = p->begin + p->len;