aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-09-12 13:28:26 -0700
committerBrian Behlendorf <[email protected]>2019-09-12 13:28:26 -0700
commit74756182d2da0f8889b3a0a1fded274a2baa14f5 (patch)
tree37aa242f27bb1e97be087b48362abbfb69d16412 /include/sys
parentd66620681d85105256203b4f4407f0092e5a7fe7 (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9316
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/spa.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sys/spa.h b/include/sys/spa.h
index 8323662f6..51e4c0f77 100644
--- a/include/sys/spa.h
+++ b/include/sys/spa.h
@@ -1153,11 +1153,11 @@ extern int spa_history_log_nvl(spa_t *spa, nvlist_t *nvl);
extern void spa_history_log_version(spa_t *spa, const char *operation,
dmu_tx_t *tx);
extern void spa_history_log_internal(spa_t *spa, const char *operation,
- dmu_tx_t *tx, const char *fmt, ...);
+ dmu_tx_t *tx, const char *fmt, ...) __printflike(4, 5);
extern void spa_history_log_internal_ds(struct dsl_dataset *ds, const char *op,
- dmu_tx_t *tx, const char *fmt, ...);
+ dmu_tx_t *tx, const char *fmt, ...) __printflike(4, 5);
extern void spa_history_log_internal_dd(dsl_dir_t *dd, const char *operation,
- dmu_tx_t *tx, const char *fmt, ...);
+ dmu_tx_t *tx, const char *fmt, ...) __printflike(4, 5);
extern const char *spa_state_to_name(spa_t *spa);