misc/163769: [patch] fix zpool(8) compile time warnings
Garrett Cooper
yanegomi at gmail.com
Mon Jan 2 07:50:14 UTC 2012
>Number: 163769
>Category: misc
>Synopsis: [patch] fix zpool(8) compile time warnings
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 02 07:50:14 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Garrett Cooper
>Release: 9.0-PRERELEASE
>Organization:
n/a
>Environment:
FreeBSD bayonetta.local 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #0 r229187M: Sun Jan 1 14:39:27 PST 2012 gcooper at bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA amd64
>Description:
The attached patch fixes a handful compile time warnings for zpool(8).
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c
===================================================================
--- cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c (revision 229264)
+++ cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c (working copy)
@@ -132,7 +132,7 @@
for (i = 0; i < argc; i++) {
zpool_handle_t *zhp;
- if (zhp = zpool_open_canfail(g_zfs, argv[i])) {
+ if ((zhp = zpool_open_canfail(g_zfs, argv[i]))) {
if (add_pool(zhp, zlp) != 0)
*err = B_TRUE;
} else {
Index: cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
===================================================================
--- cddl/contrib/opensolaris/cmd/zpool/zpool_main.c (revision 229264)
+++ cddl/contrib/opensolaris/cmd/zpool/zpool_main.c (working copy)
@@ -2566,9 +2566,9 @@
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");
@@ -4066,7 +4066,7 @@
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) {
@@ -4321,8 +4321,9 @@
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;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list