]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix cppcheck warning in buf_init()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 30 Sep 2016 22:04:21 +0000 (15:04 -0700)
committerGitHub <noreply@github.com>
Fri, 30 Sep 2016 22:04:21 +0000 (15:04 -0700)
Cppcheck 1.63 erroneously complains about an uninitialized value
in buf_init().  Newer versions of cppcheck (1.72) handle this
correctly but we'll initialize the value anyway to silence the
warning.

Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5203

module/zfs/arc.c

index f1f61291c2a7ce939baedb6dc9fe1e5f57e6a4f3..bf078aa949bb9390bbf5b3ea6fa446468c2a4dc3 100755 (executable)
@@ -1249,7 +1249,7 @@ hdr_recl(void *unused)
 static void
 buf_init(void)
 {
-       uint64_t *ct;
+       uint64_t *ct = NULL;
        uint64_t hsize = 1ULL << 12;
        int i, j;