Skip to content

Instantly share code, notes, and snippets.

@yeradis
Created June 23, 2017 05:35
Show Gist options
  • Save yeradis/dc28cb6e67de1b579620336bcdc8e64e to your computer and use it in GitHub Desktop.
Save yeradis/dc28cb6e67de1b579620336bcdc8e64e to your computer and use it in GitHub Desktop.
#ifdef __OBJC__
#define DISABLE_NULL_WARNING \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wnonnull\"")
#define ENABLE_NULL_WARNING \
_Pragma("clang diagnostic pop")
#define DISABLE_UNUSED_WARNING \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wunused-parameter\"") \
_Pragma("clang diagnostic ignored \"-Wunused-variable\"")
#define ENABLE_UNUSED_WARNING \
_Pragma("clang diagnostic pop")
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment