Use portable format attribute for logging and panic messages.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/librte_eal/common/include/rte_common.h | 2 +-
lib/librte_eal/common/include/rte_debug.h | 2 +-
lib/librte_eal/common/include/rte_devargs.h | 2 +-
lib/librte_eal/common/include/rte_log.h | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
@@ -799,7 +799,7 @@ rte_str_to_size(const char *str)
void
rte_exit(int exit_code, const char *format, ...)
__attribute__((noreturn))
- __attribute__((format(printf, 2, 3)));
+ __rte_format(printf, 2, 3);
#ifdef __cplusplus
}
@@ -73,7 +73,7 @@ void __rte_panic(const char *funcname , const char *format, ...)
#endif
#endif
__attribute__((noreturn))
- __attribute__((format(printf, 2, 3)));
+ __rte_format(printf, 2, 3);
#ifdef __cplusplus
}
@@ -137,7 +137,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *dev);
int
rte_devargs_parsef(struct rte_devargs *da,
const char *format, ...)
-__attribute__((format(printf, 2, 0)));
+__rte_format(printf, 2, 0);
/**
* Insert an rte_devargs in the global list.
@@ -282,7 +282,7 @@ int rte_log(uint32_t level, uint32_t logtype, const char *format, ...)
__attribute__((cold))
#endif
#endif
- __attribute__((format(printf, 3, 4)));
+ __rte_format(printf, 3, 4);
/**
* Generates a log message.
@@ -311,7 +311,7 @@ int rte_log(uint32_t level, uint32_t logtype, const char *format, ...)
* - Negative on error.
*/
int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
- __attribute__((format(printf,3,0)));
+ __rte_format(printf, 3, 0);
/**
* Generates a log message.