1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix LV_FORMAT_ATTRIBUTE fix for gnu > 4.4 (#2631)

Co-authored-by: Peter Grarup <pegp@dgs-diagnostics.com>
This commit is contained in:
grarup 2021-10-04 16:42:41 +02:00 committed by GitHub
parent 61b5cbb5d3
commit 4eb406440b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -37,6 +37,7 @@
- fix(snapshot): snapshot is affected by parent's style because of wrong coordinates. - fix(snapshot): snapshot is affected by parent's style because of wrong coordinates.
- fix(disp) set default theme also for non-default displays - fix(disp) set default theme also for non-default displays
- feat(btnmatrix/keyboard): add option to show popovers on button press - feat(btnmatrix/keyboard): add option to show popovers on button press
- fix(types) LV_FORMAT_ATTRIBUTE now works with gnu version greater than 4.4
## v8.0.2 (16.07.2021) ## v8.0.2 (16.07.2021)
- fix(theme) improve button focus of keyboard - fix(theme) improve button focus of keyboard

View File

@ -77,14 +77,18 @@ typedef uint32_t lv_uintptr_t;
#define _LV_CONCAT3(x, y, z) x ## y ## z #define _LV_CONCAT3(x, y, z) x ## y ## z
#define LV_CONCAT3(x, y, z) _LV_CONCAT3(x, y, z) #define LV_CONCAT3(x, y, z) _LV_CONCAT3(x, y, z)
#if (defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)) && !defined(PYCPARSER) #if defined(PYCPARSER)
#define LV_FORMAT_ATTRIBUTE(fmtstr, vararg) __attribute__ ((format(printf, fmtstr, vararg))) #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__))
#define LV_FORMAT_ATTRIBUTE(fmtstr, vararg) __attribute__((format(printf, fmtstr, vararg)))
#else #else
#define LV_FORMAT_ATTRIBUTE(fmtstr, vararg) #define LV_FORMAT_ATTRIBUTE(fmtstr, vararg)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} /*extern "C"*/ } /*extern "C"*/
#endif #endif
#endif /*LV_TYPES_H*/ #endif /*LV_TYPES_H*/