mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-29 11:02:20 +08:00
mdbx: refine attribute-based macros.
This commit is contained in:
@@ -105,11 +105,7 @@ struct problem {
|
||||
struct problem *problems_list;
|
||||
uint64_t total_problems;
|
||||
|
||||
static void
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
#endif
|
||||
print(const char *msg, ...) {
|
||||
static void __printf_args(1, 2) print(const char *msg, ...) {
|
||||
if (!quiet) {
|
||||
va_list args;
|
||||
|
||||
@@ -120,11 +116,7 @@ static void
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 1, 2)))
|
||||
#endif
|
||||
error(const char *msg, ...) {
|
||||
static void __printf_args(1, 2) error(const char *msg, ...) {
|
||||
total_problems++;
|
||||
|
||||
if (!quiet) {
|
||||
@@ -181,10 +173,8 @@ static walk_dbi_t *pagemap_lookup_dbi(const char *dbi_name, bool silent) {
|
||||
return last = dbi;
|
||||
}
|
||||
|
||||
static void
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 4, 5)))
|
||||
#endif
|
||||
static void __printf_args(4, 5)
|
||||
|
||||
problem_add(const char *object, uint64_t entry_number, const char *msg,
|
||||
const char *extra, ...) {
|
||||
total_problems++;
|
||||
|
Reference in New Issue
Block a user