Buildfix for iOS.
Fix some initialization order warnings.
Fix some minor warnings.
Fix a bad comparison, duh.
Merge pull request #3658 from unknownbrackets/ios

iOS buildfix and clang warning fixes