なぜ "キャストのない整数からのポインタを返す"警告がありますか?警告 "戻り値は、キャストのない整数からポインタを生成します"
私は、NSStringとintを含む "Person"オブジェクトを持っています。
-(id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { Person *thePerson = [theList objectAtIndex:row]; if (tableColumn == nameTableColumn) { return thePerson.theName; } else if (tableColumn == ageTableColumn) { return thePerson.theAge; } else return nil; }
何らかの理由で、Ageインスタンス変数にポインタに関する警告が表示されます。それは不思議で、理由を知りたい。