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
@@ -1843,7 +1843,7 @@ dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname,
dsl_dir_snap_cmtime_update(ds->ds_dir);
spa_history_log_internal_ds(ds->ds_prev, "snapshot", tx, "");
spa_history_log_internal_ds(ds->ds_prev, "snapshot", tx, " ");
}
void
@@ -3722,7 +3722,7 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx)
dsl_dir_remove_livelist(origin_ds->ds_dir, tx, B_TRUE);
/* log history record */
spa_history_log_internal_ds(hds, "promote", tx, "");
spa_history_log_internal_ds(hds, "promote", tx, " ");
dsl_dir_rele(odd, FTAG);
promote_rele(ddpa, FTAG);