Question: I been trying this in my code and it doesn´t work:

```
NSArray *paths = [aUITableView indexPathsForVisibleRows];

```

An empty NSArray is returned.
But if I do this in the previous line it works fine....is this a framework bug?

```
NSArray *cells = [aUITableView visibleCells];
NSArray *paths = [aUITableView indexPathsForVisibleRows];

```

The thing is I don`t really need the cells array. So I´m getting a warning for the unused variable....and I don´t like warnings in my code. jeje.

Answer: 
It looks like a bug – you may want to [report it](http://developer.apple.com/bugreporter/).

If unused variable is a problem, then don't create unused variable! :)

Instead of:

```
NSArray *cells = [aUITableView visibleCells];

```

write:

```
[aUITableView visibleCells]; // don't remove, workaround for a bug <link here>

```
This bug is still occurring in iOS 4.2. You can fix it without a warning by simply calling `[tableView visibleCells];` and not assigning the result of the call to a variable. Just because a method has a return value, you don't need to pay attention to it. I'm filing a bug report with Apple.