Xcode warnings

Some minor fixes for warnings thrown up by Xcode 4.4.1.

Not sure about the 10.6 sdk change for the unit tests, but I think the others are all safe for older Xcodes too.