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:
@@ -376,7 +376,7 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table,
|
||||
int bits, const void *addr)
|
||||
{
|
||||
struct hlist_head *head;
|
||||
struct hlist_node *node;
|
||||
struct hlist_node *node = NULL;
|
||||
struct kmem_debug *p;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -573,7 +573,7 @@ static void
|
||||
spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock)
|
||||
{
|
||||
unsigned long flags;
|
||||
kmem_debug_t *kd;
|
||||
kmem_debug_t *kd = NULL;
|
||||
char str[17];
|
||||
|
||||
spin_lock_irqsave(lock, flags);
|
||||
|
||||
Reference in New Issue
Block a user