Skip to content

Commit

Permalink
common: fix PL_PRINTF nonnull annotation
Browse files Browse the repository at this point in the history
Should apply only to the format string, since pl_log may be NULL (as may
other pointer arguments).
  • Loading branch information
haasn committed Aug 6, 2023
1 parent 5216189 commit a09b834
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@

#if defined(__MINGW32__) && !defined(__clang__)
#define PL_PRINTF(fmt, va) __attribute__ ((format(gnu_printf, fmt, va))) \
__attribute__ ((nonnull))
__attribute__ ((nonnull(fmt)))
#elif defined(__GNUC__)
#define PL_PRINTF(fmt, va) __attribute__ ((format(printf, fmt, va))) \
__attribute__ ((nonnull))
__attribute__ ((nonnull(fmt)))
#else
#define PL_PRINTF(fmt, va)
#endif
Expand Down

0 comments on commit a09b834

Please sign in to comment.