Clean up annoying warnings

The indexer code was generating warnings on Windows 64-bit.  I
looked closely at the logic and was able to simplify it a bit.

Also this fixes some other Windows and Linux warnings.