]> granicus.if.org Git - zfs/commitdiff
Fix uninitialized variables
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 13 Sep 2013 20:10:36 +0000 (13:10 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 13 Sep 2013 20:31:24 +0000 (13:31 -0700)
When compiling on an ARM device using gcc 4.7.3 several variables
in the zfs_obj_to_path_impl() function were flagged as uninitialized.
To resolve the warnings explicitly initialize them to zero.

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

module/zfs/zfs_znode.c

index aaf17e18f4951969b932acb7989d75b7fc33552d..fae32ad9a098214f6792dfd0f6d9e8105225c9d8 100644 (file)
@@ -1716,10 +1716,10 @@ zfs_obj_to_path_impl(objset_t *osp, uint64_t obj, sa_handle_t *hdl,
        sa_hdl = hdl;
 
        for (;;) {
-               uint64_t pobj;
+               uint64_t pobj = 0;
                char component[MAXNAMELEN + 2];
                size_t complen;
-               int is_xattrdir;
+               int is_xattrdir = 0;
 
                if (prevdb)
                        zfs_release_sa_handle(prevhdl, prevdb, FTAG);