Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Static Analyzer warnings for debug-only variable "responseString" #7

Open
lightbow opened this issue Dec 29, 2014 · 0 comments
Open

Comments

@lightbow
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant