cppcheck: (error) Uninitialized variable

As of cppcheck 1.82 warnings are issued when using the list_for_each_*
functions with an uninitialized variable.  Functionally, this is fine
but to resolve the warning initialize these variables.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9732
This commit is contained in:
Ubuntu
2019-12-14 00:07:48 +00:00
committed by Brian Behlendorf
parent 5215fdd43c
commit 7cf1fe6331
8 changed files with 23 additions and 22 deletions
+2 -2
View File
@@ -144,7 +144,7 @@ proc_doslab(struct ctl_table *table, int write,
int rc = 0;
unsigned long min = 0, max = ~0, val = 0, mask;
spl_ctl_table dummy = *table;
spl_kmem_cache_t *skc;
spl_kmem_cache_t *skc = NULL;
dummy.data = &val;
dummy.proc_handler = &proc_dointvec;
@@ -249,7 +249,7 @@ static int
taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag)
{
taskq_t *tq = p;
taskq_thread_t *tqt;
taskq_thread_t *tqt = NULL;
spl_wait_queue_entry_t *wq;
struct task_struct *tsk;
taskq_ent_t *tqe;