fix xcode warnings regarding value conversion and format string issues