Skip to content

Instantly share code, notes, and snippets.

@steipete
Created February 17, 2017 08:38
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save steipete/57e95fbde1d164cb0be89793cf2545ad to your computer and use it in GitHub Desktop.
Save steipete/57e95fbde1d164cb0be89793cf2545ad to your computer and use it in GitHub Desktop.
PSPDF_KEYPATH without all the warnings
#define PSPDF_KEYPATH(object, property) (^{ \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunreachable-code\"") \
_Pragma("clang diagnostic ignored \"-Wimplicit-retain-self\"") \
return ((void)(NO && ((void)object.property, NO)), @#property); \
_Pragma("clang diagnostic pop") \
}())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment