summaryrefslogtreecommitdiffstats
path: root/cmd/ztest
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 09:52:39 -0700
committerBrian Behlendorf <[email protected]>2010-08-27 15:33:32 -0700
commitb8864a233c569edcc57c686f3ea8cd1ae3b89153 (patch)
tree98f5f0a1b99e25031c2b8647b5bb38020f5e7657 /cmd/ztest
parentd6320ddb78fa89c4d0fc2af00ae53c7c70992f96 (diff)
Fix gcc cast warnings
Gcc -Wall warn: 'lacks a cast' Gcc -Wall warn: 'comparison between pointer and integer' Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'cmd/ztest')
-rw-r--r--cmd/ztest/ztest.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index a6503f477..771f1427e 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -2022,7 +2022,7 @@ ztest_od_init(ztest_od_t *od, uint64_t id, char *tag, uint64_t index,
od->od_gen = 0;
(void) snprintf(od->od_name, sizeof (od->od_name), "%s(%lld)[%llu]",
- tag, (int64_t)id, index);
+ tag, (longlong_t)id, (u_longlong_t)index);
}
/*
@@ -3042,11 +3042,16 @@ ztest_dsl_dataset_cleanup(char *osname, uint64_t id)
char snap3name[MAXNAMELEN];
int error;
- (void) snprintf(snap1name, MAXNAMELEN, "%s@s1_%llu", osname, id);
- (void) snprintf(clone1name, MAXNAMELEN, "%s/c1_%llu", osname, id);
- (void) snprintf(snap2name, MAXNAMELEN, "%s@s2_%llu", clone1name, id);
- (void) snprintf(clone2name, MAXNAMELEN, "%s/c2_%llu", osname, id);
- (void) snprintf(snap3name, MAXNAMELEN, "%s@s3_%llu", clone1name, id);
+ (void) snprintf(snap1name, MAXNAMELEN, "%s@s1_%llu",
+ osname, (u_longlong_t)id);
+ (void) snprintf(clone1name, MAXNAMELEN, "%s/c1_%llu",
+ osname, (u_longlong_t)id);
+ (void) snprintf(snap2name, MAXNAMELEN, "%s@s2_%llu",
+ clone1name, (u_longlong_t)id);
+ (void) snprintf(clone2name, MAXNAMELEN, "%s/c2_%llu",
+ osname, (u_longlong_t)id);
+ (void) snprintf(snap3name, MAXNAMELEN, "%s@s3_%llu",
+ clone1name, (u_longlong_t)id);
error = dmu_objset_destroy(clone2name, B_FALSE);
if (error && error != ENOENT)
@@ -3086,11 +3091,16 @@ ztest_dsl_dataset_promote_busy(ztest_ds_t *zd, uint64_t id)
ztest_dsl_dataset_cleanup(osname, id);
- (void) snprintf(snap1name, MAXNAMELEN, "%s@s1_%llu", osname, id);
- (void) snprintf(clone1name, MAXNAMELEN, "%s/c1_%llu", osname, id);
- (void) snprintf(snap2name, MAXNAMELEN, "%s@s2_%llu", clone1name, id);
- (void) snprintf(clone2name, MAXNAMELEN, "%s/c2_%llu", osname, id);
- (void) snprintf(snap3name, MAXNAMELEN, "%s@s3_%llu", clone1name, id);
+ (void) snprintf(snap1name, MAXNAMELEN, "%s@s1_%llu",
+ osname, (u_longlong_t)id);
+ (void) snprintf(clone1name, MAXNAMELEN, "%s/c1_%llu",
+ osname, (u_longlong_t)id);
+ (void) snprintf(snap2name, MAXNAMELEN, "%s@s2_%llu",
+ clone1name, (u_longlong_t)id);
+ (void) snprintf(clone2name, MAXNAMELEN, "%s/c2_%llu",
+ osname, (u_longlong_t)id);
+ (void) snprintf(snap3name, MAXNAMELEN, "%s@s3_%llu",
+ clone1name, (u_longlong_t)id);
error = dmu_objset_snapshot(osname, strchr(snap1name, '@')+1,
NULL, NULL, B_FALSE, B_FALSE, -1);
@@ -3912,7 +3922,7 @@ ztest_fzap(ztest_ds_t *zd, uint64_t id)
int error;
(void) snprintf(name, sizeof (name), "fzap-%llu-%llu",
- id, value);
+ (u_longlong_t)id, (u_longlong_t)value);
tx = dmu_tx_create(os);
dmu_tx_hold_zap(tx, object, B_TRUE, name);