Use platform for indexing physical resources.
Fix unchecked warning.