mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
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:
@@ -431,7 +431,7 @@ static struct seq_operations kstat_seq_ops = {
|
||||
static kstat_module_t *
|
||||
kstat_find_module(char *name)
|
||||
{
|
||||
kstat_module_t *module;
|
||||
kstat_module_t *module = NULL;
|
||||
|
||||
list_for_each_entry(module, &kstat_module_list, ksm_module_list) {
|
||||
if (strncmp(name, module->ksm_name, KSTAT_STRLEN) == 0)
|
||||
@@ -624,7 +624,7 @@ static int
|
||||
kstat_detect_collision(kstat_proc_entry_t *kpep)
|
||||
{
|
||||
kstat_module_t *module;
|
||||
kstat_proc_entry_t *tmp;
|
||||
kstat_proc_entry_t *tmp = NULL;
|
||||
char *parent;
|
||||
char *cp;
|
||||
|
||||
@@ -659,7 +659,7 @@ kstat_proc_entry_install(kstat_proc_entry_t *kpep, mode_t mode,
|
||||
const struct file_operations *file_ops, void *data)
|
||||
{
|
||||
kstat_module_t *module;
|
||||
kstat_proc_entry_t *tmp;
|
||||
kstat_proc_entry_t *tmp = NULL;
|
||||
|
||||
ASSERT(kpep);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user