Skip to content

Instantly share code, notes, and snippets.

@PsychoH13
Created July 5, 2012 16:28
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 PsychoH13/3054657 to your computer and use it in GitHub Desktop.
Save PsychoH13/3054657 to your computer and use it in GitHub Desktop.
False-positive static analyzer
struct RandomStruct { NSInteger columnSpan; };
void WeirdStaticAnalyzerDiagnostic(void)
{
struct TestStruct { struct RandomStruct strf; NSUInteger intf; } origin = { { 0 }, 0 };
origin.strf = (struct RandomStruct){ 0 };
struct TestStruct trigger = origin;
NSLog(@"%ld", trigger.intf);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment