ChimpKit3 icon indicating copy to clipboard operation
ChimpKit3 copied to clipboard

Static Analyzer warnings for debug-only variable "responseString"

Open lightbow opened this issue 11 years ago • 0 comments

When running the static analyzer, two errors show up:

Pods/ChimpKit/ChimpKit3/Helper Objects/CKSubscribeAlertView.m:103:20: Value stored to 'responseString' during its initialization is never read Pods/ChimpKit/ChimpKit3/Helper Objects/CKAuthViewController.m:243:14: Value stored to 'responseString' during its initialization is never read

Consider moving the NSLog inside the "if (kCKDebug)" in the following code: (same issue in both places)

NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; if (kCKDebug) NSLog(@"Response String: %@", responseString);

Many projects strive to build with zero warnings, including the static analyzer. This should be a quick fix and will make it easier for developers to maintain "zero warning" build policies.

lightbow avatar Dec 29 '14 18:12 lightbow