Fix gcc fortify source warnings
[zfs.git] / cmd / zpool / zpool_main.c
index 8aa985b..4fe14c8 100644 (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;
                }