From 74b50b2c56d78f47c40f70355b11f8332aa227e4 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Tue, 21 May 2024 10:04:31 +0800 Subject: [PATCH] feat(printf): LV_FORMAT_ATTRIBUTE for IAR compiler (#6231) --- src/misc/lv_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/lv_types.h b/src/misc/lv_types.h index ecded1fe43b0..28cf951e3f88 100644 --- a/src/misc/lv_types.h +++ b/src/misc/lv_types.h @@ -182,7 +182,7 @@ typedef struct _lv_sysmon_perf_info_t lv_sysmon_perf_info_t; #define LV_FORMAT_ATTRIBUTE(fmtstr, vararg) #elif defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __GNUC__ > 4) #define LV_FORMAT_ATTRIBUTE(fmtstr, vararg) __attribute__((format(gnu_printf, fmtstr, vararg))) -#elif (defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)) +#elif (defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) || defined(__IAR_SYSTEMS_ICC__)) #define LV_FORMAT_ATTRIBUTE(fmtstr, vararg) __attribute__((format(printf, fmtstr, vararg))) #else #define LV_FORMAT_ATTRIBUTE(fmtstr, vararg)