aydin ozer
aydin ozer

Reputation: 11

Unused variable & path

I keep banging my head on the keyboard... why do I get these warnings? :
Unused variable '*' Unused variable 'path'

-(IBAction)pushGenerate {
NSString *title = nil;
NSString *path = nil;

static NSString* a[] = {        
    @"What do I want?",
    @"Who do I want?",
};

Upvotes: 1

Views: 484

Answers (2)

Tendulkar
Tendulkar

Reputation: 5540

You have not used these variables within that function.That's why it is displaying the warnings

Upvotes: 2

dasdom
dasdom

Reputation: 14063

In pushGenerate you are creating a pointer to an address holding a string and setting it to nil but you aren't using it. At the end of pushGenerate this address is lost as the variable was local.

What are you trying to do?

Upvotes: 1

Related Questions