]> granicus.if.org Git - zfs/commitdiff
Avoid gcc -Werror=maybe-uninitialized warnings
authorChris Wedgwood <cw@f00f.org>
Sat, 26 Jan 2013 02:19:45 +0000 (18:19 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 28 Jan 2013 17:10:29 +0000 (09:10 -0800)
Explicitly set acl details to zero to silence gcc (zfs_acl_node_read
can't be sure zfs_acl_znode_info will set acl_count and aclsize).
Normally suppressing these warnings by setting this to zero at
declaration time is a bad idea but in this instance it's hard to
avoid and should be fairly safe.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1244

module/zfs/zfs_acl.c

index db6331ea595c665dd6d6d5b876a4e5cabed352ba..8ab5abe81666cc361b2638ff99355f5ac14b06b7 100644 (file)
@@ -1056,8 +1056,8 @@ zfs_acl_node_read(znode_t *zp, boolean_t have_lock, zfs_acl_t **aclpp,
     boolean_t will_modify)
 {
        zfs_acl_t       *aclp;
-       int             aclsize;
-       int             acl_count;
+       int             aclsize = 0;
+       int             acl_count = 0;
        zfs_acl_node_t  *aclnode;
        zfs_acl_phys_t  znode_acl;
        int             version;