Skip to content

Commit

Permalink
fix(printf) skip defining attribute if pycparser is used
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Jul 11, 2021
1 parent 078eaa0 commit ee9bbea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc/lv_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ typedef uint32_t lv_uintptr_t;
#define _LV_CONCAT3(x, y, z) x ## y ## z
#define LV_CONCAT3(x, y, z) _LV_CONCAT3(x, y, z)

#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#if (defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)) && !defined(PYCPARSER)
#define LV_FORMAT_ATTRIBUTE(fmtstr, vararg) __attribute__ ((format(printf, fmtstr, vararg)))
#else
#define LV_FORMAT_ATTRIBUTE(fmtstr, vararg)
Expand Down

3 comments on commit ee9bbea

@embeddedt
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amirgon Is there a way that I can exclude a definition from pycparser? Using PYCPARSER like this doesn't seem to work.

@amirgon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using PYCPARSER like this doesn't seem to work.

@embeddedt You can add -DPYCPARSER in py.mk preprocessing command

@embeddedt
Copy link
Member Author

@embeddedt embeddedt commented on ee9bbea Jul 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks; that worked!

Please sign in to comment.