Skip to content

Instantly share code, notes, and snippets.

@dabing1022
Last active July 21, 2016 07:10
Show Gist options
  • Save dabing1022/3f76a2fbe482be84a13ffbfddf67c722 to your computer and use it in GitHub Desktop.
Save dabing1022/3f76a2fbe482be84a13ffbfddf67c722 to your computer and use it in GitHub Desktop.
add `__unused`
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
// Start executing the requested task
[targetForExecution performSelector:methodForExecution withObject:objectForExecution];
#pragma clang diagnostic pop
"-Wgnu"
"-Warc-performSelector-leaks"
"-Warc-retain-cycles"
"-Wobjc-interface-ivars"
"-Wdeprecated-implementations"
"-Wdeprecated-declarations"
"-Wunreachable-code"
"-Wimplicit-atomic-properties"
"-Wcovered-switch-default"
"-Wassign-enum"
"-Wimplicit-retain-self"
"-Wundeclared-selector"
"-Wundeclared-selector"
`__unused` / `__attribute__((unused))` 忽略没有使用变量属性而引起的警告
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment