From 543b0c644a36a5804e65e6009db48d10e3dadfc3 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Tue, 7 Jan 2020 18:02:49 -0500 Subject: [PATCH] Fix zfs-0.8.3 'make lint' warnings Fix these lint warnings on zfs-0.8.3: $ make lint [module/spl/spl-vnode.c:494]: (error) Uninitialized variable: fp [module/spl/spl-vnode.c:706]: (error) Uninitialized variable: fp [module/spl/spl-vnode.c:706]: (error) Uninitialized variable: next_fp ^CMakefile:1632: recipe for target 'cppcheck' failed make: *** [cppcheck] Interrupt Signed-off-by: Tony Hutter --- module/spl/spl-vnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index d9056c964..032bd1aba 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -489,7 +489,7 @@ EXPORT_SYMBOL(vn_space); static file_t * file_find(int fd, struct task_struct *task) { - file_t *fp; + file_t *fp = NULL; list_for_each_entry(fp, &vn_file_list, f_list) { if (fd == fp->f_fd && fp->f_task == task) { @@ -698,7 +698,7 @@ spl_vn_init(void) void spl_vn_fini(void) { - file_t *fp, *next_fp; + file_t *fp = NULL, *next_fp = NULL; int leaked = 0; spin_lock(&vn_file_lock);