Skip to content

Instantly share code, notes, and snippets.

@MadCoder
Created August 30, 2016 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MadCoder/29ef6a0ec11d7fdc11c17c133221a5f2 to your computer and use it in GitHub Desktop.
Save MadCoder/29ef6a0ec11d7fdc11c17c133221a5f2 to your computer and use it in GitHub Desktop.
__attribute__((warn_unused_result))
id my_func(int a, int b, int c);
#define my_func(a, b, c) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic error \"-Wunused-result\"") \
my_func(a, b, c) \
_Pragma("clang diagnostic pop")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment