Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Prevent use of macro __warn_unused_result__ for M1 Macs, fixing Issue #…
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmatters authored Nov 22, 2022
1 parent c57c74a commit ac4ab6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/tradstdc.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,11 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
#if __GNUC__ >= 3
#define UNUSED __attribute__((unused))
#define NORETURN __attribute__((noreturn))
#if !defined(__linux__) || defined(GCC_URWARN)
#if defined(GCC_URWARN)
/* disable gcc's __attribute__((__warn_unused_result__)) since explicitly
discarding the result by casting to (void) is not accepted as a 'use' */
discarding the result by casting to (void) is not accepted as a 'use'.
This appears to be a problem for both Linux and M1 Macs.
*/
#define __warn_unused_result__ /*empty*/
#define warn_unused_result /*empty*/
#endif
Expand Down

0 comments on commit ac4ab6b

Please sign in to comment.