When I build the below code, I get a warning like “Format not a string literal and no format arguments”.
NSString *items = [NSString stringWithFormat:@"%d",itemNumber[0]];
for (int i = 1; i < (_housesOwned[0] + 1); i++)
{
items = [items stringByAppendingFormat:[NSString stringWithFormat:@",%d", itemNumber[i]]];
}
I’m getting the warning in the line inside for loop.
itemNumber is an int array. Please help. Even though build is successful, I’m having a feeling like this could mess up in future.
You make this line
to
or
This will not give warning. Nothing else.