From 22eee9b4a868ee7612360d0d8b28a2618711e596 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 4 Dec 2006 11:02:50 +0000 Subject: [PATCH] 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: http://svn.code.sf.net/p/scst/svn/trunk@41 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_fileio.c | 2 +- scst/src/scst_proc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scst/src/dev_handlers/scst_fileio.c b/scst/src/dev_handlers/scst_fileio.c index 46fcb076a..500c84897 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 580cc974b..570d7064a 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;