[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 13/14] error: Do compile-time format string checking on grub_e
From: |
Glenn Washburn |
Subject: |
[PATCH v6 13/14] error: Do compile-time format string checking on grub_error |
Date: |
Thu, 4 Mar 2021 18:22:44 -0600 |
This should help prevent format string errors and thus improve the quality
of error reporting.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
include/grub/err.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/grub/err.h b/include/grub/err.h
index 24ba9f5f5..b08d5d0de 100644
--- a/include/grub/err.h
+++ b/include/grub/err.h
@@ -85,7 +85,8 @@ struct grub_error_saved
extern grub_err_t EXPORT_VAR(grub_errno);
extern char EXPORT_VAR(grub_errmsg)[GRUB_MAX_ERRMSG];
-grub_err_t EXPORT_FUNC(grub_error) (grub_err_t n, const char *fmt, ...);
+grub_err_t EXPORT_FUNC(grub_error) (grub_err_t n, const char *fmt, ...)
+ __attribute__ ((format (GNU_PRINTF, 2, 3)));
void EXPORT_FUNC(grub_fatal) (const char *fmt, ...) __attribute__ ((noreturn));
void EXPORT_FUNC(grub_error_push) (void);
int EXPORT_FUNC(grub_error_pop) (void);
--
2.27.0
- [PATCH v6 06/14] pgp: Format code for grub_error is incorrect, (continued)
- [PATCH v6 06/14] pgp: Format code for grub_error is incorrect, Glenn Washburn, 2021/03/04
- [PATCH v6 10/14] error: Use format code PRIxGRUB_UINT64_T for 64-bit arg in grub_error, Glenn Washburn, 2021/03/04
- [PATCH v6 08/14] error: Use PRI* macros to get correct format string code across architectures, Glenn Washburn, 2021/03/04
- [PATCH v6 01/14] misc: Format string for grub_error should be a literal, Glenn Washburn, 2021/03/04
- [PATCH v6 03/14] error: grub_error format string add missing format code, Glenn Washburn, 2021/03/04
- [PATCH v6 05/14] grub_error: Use format code PRIuGRUB_SIZE for variables of type grub_size_t, Glenn Washburn, 2021/03/04
- [PATCH v6 09/14] error: Use format code PRIxGRUB_UINT64_T for 64-bit uint argument in grub_error, Glenn Washburn, 2021/03/04
- [PATCH v6 04/14] dmraid_nvidia: Format string error in grub_error, Glenn Washburn, 2021/03/04
- [PATCH v6 14/14] zfs: Use grub_uint64_t instead of 1ULL in BF64_*CODE macros, Glenn Washburn, 2021/03/04
- [PATCH v6 11/14] error: Use format code PRIuGRUB_UINT64_T for 64-bit typed fileblock in grub_error, Glenn Washburn, 2021/03/04
- [PATCH v6 13/14] error: Do compile-time format string checking on grub_error,
Glenn Washburn <=
- [PATCH v6 12/14] error: Use format code llu for 64-bit uint bp->blk_prop in grub_error, Glenn Washburn, 2021/03/04
- Re: [PATCH v6 00/14] error: Do compile-time format string checking on grub>, Daniel Kiper, 2021/03/05