Jules
Jules

Reputation: 7766

Objective-C, Expression result unused, from some old code?

I've getting the following warning Expression result unused

I've inherited the code from my predecessor and I've no idea how to fix this?

Obviously syntax has changed, any ideas ?

static float lowValue; 
static float highValue;

- (void) calculateHighLow{
    highValue;  //here
    lowValue;  // and here

Upvotes: 0

Views: 572

Answers (3)

5StringRyan
5StringRyan

Reputation: 3634

If they aren't being used anywhere you can just delete the lines, or you can simply just decide to deal with the warning (though not a good idea). You can also comment out the code, in case you figure out that might need them someday.

Upvotes: 0

grandouassou
grandouassou

Reputation: 2530

Obviously those two lines don't do anything so you can just remove them.

Upvotes: 2

Eugene
Eugene

Reputation: 10045

Simply delete those two lines, they have no purpose.

Upvotes: 3

Related Questions