mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Fix gcc uninitialized variable warnings
Gcc -Wall warn: 'uninitialized variable' Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
@@ -3269,7 +3269,7 @@ print_scan_status(pool_scan_stat_t *ps)
|
||||
*/
|
||||
if (ps->pss_state == DSS_FINISHED) {
|
||||
uint64_t minutes_taken = (end - start) / 60;
|
||||
char *fmt;
|
||||
char *fmt = NULL;
|
||||
|
||||
if (ps->pss_func == POOL_SCAN_SCRUB) {
|
||||
fmt = gettext("scrub repaired %s in %lluh%um with "
|
||||
@@ -4392,7 +4392,7 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
int i;
|
||||
int i = 0;
|
||||
char *cmdname;
|
||||
|
||||
(void) setlocale(LC_ALL, "");
|
||||
@@ -4450,6 +4450,7 @@ main(int argc, char **argv)
|
||||
(void) fprintf(stderr, gettext("unrecognized "
|
||||
"command '%s'\n"), cmdname);
|
||||
usage(B_FALSE);
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
libzfs_fini(g_zfs);
|
||||
|
||||
@@ -548,7 +548,7 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
|
||||
uint_t c, children;
|
||||
nvlist_t *nv;
|
||||
char *type;
|
||||
replication_level_t lastrep, rep, *ret;
|
||||
replication_level_t lastrep = { 0 }, rep, *ret;
|
||||
boolean_t dontreport;
|
||||
|
||||
ret = safe_malloc(sizeof (replication_level_t));
|
||||
|
||||
Reference in New Issue
Block a user