mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Fix format args to die()
Also, add the format attribute so we get warnings about this. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
d228e43048
commit
fe1bb39aa5
@ -258,7 +258,7 @@ int cmd_format(int argc, char *argv[])
|
|||||||
darray_size(device_paths),
|
darray_size(device_paths),
|
||||||
bch2_opts_empty());
|
bch2_opts_empty());
|
||||||
if (IS_ERR(c))
|
if (IS_ERR(c))
|
||||||
die("error opening %s: %s", device_paths.item,
|
die("error opening %s: %s", device_paths.item[0],
|
||||||
strerror(-PTR_ERR(c)));
|
strerror(-PTR_ERR(c)));
|
||||||
|
|
||||||
bch2_fs_stop(c);
|
bch2_fs_stop(c);
|
||||||
|
@ -257,7 +257,7 @@ struct bch_sb *bch2_format(struct bch_opt_strs fs_opt_strs,
|
|||||||
|
|
||||||
idx = bch2_disk_path_find_or_create(&sb, i->group);
|
idx = bch2_disk_path_find_or_create(&sb, i->group);
|
||||||
if (idx < 0)
|
if (idx < 0)
|
||||||
die("error creating disk path: %s", idx);
|
die("error creating disk path: %s", i->group);
|
||||||
|
|
||||||
SET_BCH_MEMBER_GROUP(m, idx + 1);
|
SET_BCH_MEMBER_GROUP(m, idx + 1);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#define noreturn __attribute__((noreturn))
|
#define noreturn __attribute__((noreturn))
|
||||||
|
|
||||||
void die(const char *, ...) noreturn;
|
void die(const char *, ...) __attribute__((format(printf, 1, 2))) noreturn;
|
||||||
char *mprintf(const char *, ...)
|
char *mprintf(const char *, ...)
|
||||||
__attribute__ ((format (printf, 1, 2)));
|
__attribute__ ((format (printf, 1, 2)));
|
||||||
void *xcalloc(size_t, size_t);
|
void *xcalloc(size_t, size_t);
|
||||||
|
Loading…
Reference in New Issue
Block a user