Skip to content

Commit

Permalink
platform.h: add __unused
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Aug 12, 2024
1 parent e272c53 commit 496a8cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@
#endif
#endif /* !defined(__printflike) */

#if !defined(__unused)
#if __has_attribute(__unused__)
#define __unused __attribute__((__unused__))
#else
#define __unused
#endif
#endif /* !defined(__unused) */

#if __has_builtin(__builtin_add_overflow)
#define ADD_U32_OVERFLOW(a, b, c) __builtin_add_overflow(a, b, c)
#else
Expand Down

0 comments on commit 496a8cb

Please sign in to comment.