Fix up dead code and null pointer warnings in platform-core....