Skip to content

Commit

Permalink
trim down the NPF_PRINTF_ATTR macro a bit, clang + gcc are the same h…
Browse files Browse the repository at this point in the history
…ere (#216)
  • Loading branch information
charlesnicholson authored Apr 30, 2022
1 parent 14a83dc commit 766fc0a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions nanoprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
#define NPF_VISIBILITY extern
#endif

#if defined(__clang__)
#define NPF_PRINTF_ATTR(FORMAT_INDEX, VARGS_INDEX) \
__attribute__((__format__(__printf__, FORMAT_INDEX, VARGS_INDEX)))
#elif defined(__GNUC__) || defined(__GNUG__)
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#define NPF_PRINTF_ATTR(FORMAT_INDEX, VARGS_INDEX) \
__attribute__((format(printf, FORMAT_INDEX, VARGS_INDEX)))
#else
Expand Down

0 comments on commit 766fc0a

Please sign in to comment.