From 74756182d2da0f8889b3a0a1fded274a2baa14f5 Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Thu, 12 Sep 2019 13:28:26 -0700 Subject: 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 Reviewed-by: Brian Behlendorf Signed-off-by: Matt Macy Closes #9316 --- module/zfs/dsl_destroy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/zfs/dsl_destroy.c') diff --git a/module/zfs/dsl_destroy.c b/module/zfs/dsl_destroy.c index a30018341..ee237a85b 100644 --- a/module/zfs/dsl_destroy.c +++ b/module/zfs/dsl_destroy.c @@ -321,14 +321,14 @@ dsl_destroy_snapshot_sync_impl(dsl_dataset_t *ds, boolean_t defer, dmu_tx_t *tx) ASSERT(spa_version(dp->dp_spa) >= SPA_VERSION_USERREFS); dmu_buf_will_dirty(ds->ds_dbuf, tx); dsl_dataset_phys(ds)->ds_flags |= DS_FLAG_DEFER_DESTROY; - spa_history_log_internal_ds(ds, "defer_destroy", tx, ""); + spa_history_log_internal_ds(ds, "defer_destroy", tx, " "); return; } ASSERT3U(dsl_dataset_phys(ds)->ds_num_children, <=, 1); /* We need to log before removing it from the namespace. */ - spa_history_log_internal_ds(ds, "destroy", tx, ""); + spa_history_log_internal_ds(ds, "destroy", tx, " "); dsl_scan_ds_destroyed(ds, tx); @@ -1000,7 +1000,7 @@ dsl_destroy_head_sync_impl(dsl_dataset_t *ds, dmu_tx_t *tx) ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock)); /* We need to log before removing it from the namespace. */ - spa_history_log_internal_ds(ds, "destroy", tx, ""); + spa_history_log_internal_ds(ds, "destroy", tx, " "); rmorigin = (dsl_dir_is_clone(ds->ds_dir) && DS_IS_DEFER_DESTROY(ds->ds_prev) && @@ -1167,7 +1167,7 @@ dsl_destroy_head_begin_sync(void *arg, dmu_tx_t *tx) dmu_buf_will_dirty(ds->ds_dbuf, tx); dsl_dataset_phys(ds)->ds_flags |= DS_FLAG_INCONSISTENT; - spa_history_log_internal_ds(ds, "destroy begin", tx, ""); + spa_history_log_internal_ds(ds, "destroy begin", tx, " "); dsl_dataset_rele(ds, FTAG); } -- cgit v1.2.3