Skip to content

Commit

Permalink
Fix uninitialized variables
Browse files Browse the repository at this point in the history
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 openzfs#1716
  • Loading branch information
behlendorf authored and unya committed Dec 13, 2013
1 parent eb5b0af commit c261a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/zfs/zfs_znode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c261a6a

Please sign in to comment.