mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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:
committed by
Brian Behlendorf
parent
d66620681d
commit
74756182d2
@@ -50,6 +50,8 @@
|
||||
/*
|
||||
* Common DEBUG functionality.
|
||||
*/
|
||||
#define __printflike(a, b) __printf(a, b)
|
||||
|
||||
int spl_panic(const char *file, const char *func, int line,
|
||||
const char *fmt, ...);
|
||||
void spl_dumpstack(void);
|
||||
|
||||
+3
-3
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user