Fix uninitialized varible in zfs_do_userspace()

When compiling under Debian Lenny with gcc version 4.3.2
(Debian 4.3.2-1.1) the following warning occurs.  To quiet
the warning initialize 'error' to zero.  Newer versions of
gcc correctly determine that this uninitialized varible is
impossible because ZFS_NUM_USERQUOTA_PROPS is known to be
greater than zero.

  cmd/zfs/zfs_main.c:2377: warning: "error" may be
  used uninitialized in this function

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf 2011-09-27 16:32:53 -07:00
parent dee28b0700
commit c70602f1ea

View File

@ -2374,7 +2374,7 @@ zfs_do_userspace(int argc, char **argv)
boolean_t prtnum = B_FALSE;
boolean_t parseable = B_FALSE;
boolean_t sid2posix = B_FALSE;
int error;
int error = 0;
int c;
zfs_sort_column_t *default_sortcol = NULL;
zfs_sort_column_t *sortcol = NULL;