Fix warning on uninitialized variable.
Merge pull request #2365 from kitbellew/fix-indexer-mmap

Fix warning on uninitialized variable.
Fix mkstemp open flags.