Enable compiler to typecheck logging

Annotate spa logging declarations with printflike
Workaround gcc bug (non disable-able warning) by
replacing "" with " "

Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #9316
This commit is contained in:
Matthew Macy
2019-09-12 13:28:26 -07:00
committed by Brian Behlendorf
parent d66620681d
commit 74756182d2
12 changed files with 39 additions and 27 deletions
+2 -2
View File
@@ -1262,7 +1262,7 @@ dmu_objset_create_sync(void *arg, dmu_tx_t *tx)
mutex_exit(&ds->ds_lock);
}
spa_history_log_internal_ds(ds, "create", tx, "");
spa_history_log_internal_ds(ds, "create", tx, " ");
zvol_create_minors(spa, doca->doca_name, B_TRUE);
dsl_dataset_rele_flags(ds, DS_HOLD_FLAG_DECRYPT, FTAG);
@@ -1375,7 +1375,7 @@ dmu_objset_clone_sync(void *arg, dmu_tx_t *tx)
VERIFY0(dsl_dataset_hold_obj(pdd->dd_pool, obj, FTAG, &ds));
dsl_dataset_name(origin, namebuf);
spa_history_log_internal_ds(ds, "clone", tx,
"origin=%s (%llu)", namebuf, origin->ds_object);
"origin=%s (%llu)", namebuf, (u_longlong_t)origin->ds_object);
zvol_create_minors(dp->dp_spa, doca->doca_clone, B_TRUE);
dsl_dataset_rele(ds, FTAG);
dsl_dataset_rele(origin, FTAG);