Fix gcc cast warnings

Gcc -Wall warn: 'lacks a cast'
Gcc -Wall warn: 'comparison between pointer and integer'

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2010-08-26 09:52:39 -07:00
parent d6320ddb78
commit b8864a233c
16 changed files with 90 additions and 77 deletions
+5 -5
View File
@@ -2438,9 +2438,9 @@ print_header(zprop_list_t *pl)
if (pl->pl_next == NULL && !right_justify)
(void) printf("%s", header);
else if (right_justify)
(void) printf("%*s", pl->pl_width, header);
(void) printf("%*s", (int)pl->pl_width, header);
else
(void) printf("%-*s", pl->pl_width, header);
(void) printf("%-*s", (int)pl->pl_width, header);
}
(void) printf("\n");
@@ -3906,7 +3906,7 @@ upgrade_one(zpool_handle_t *zhp, void *data)
if (cur_version > cbp->cb_version) {
(void) printf(gettext("Pool '%s' is already formatted "
"using more current version '%llu'.\n"),
zpool_get_name(zhp), cur_version);
zpool_get_name(zhp), (u_longlong_t) cur_version);
return (0);
}
if (cur_version == cbp->cb_version) {
@@ -4147,8 +4147,8 @@ get_history_one(zpool_handle_t *zhp, void *data)
continue;
(void) snprintf(internalstr,
sizeof (internalstr),
"[internal %s txg:%lld] %s",
zfs_history_event_names[ievent], txg,
"[internal %s txg:%llu] %s",
zfs_history_event_names[ievent], (u_longlong_t)txg,
pathstr);
cmdstr = internalstr;
}