Avoid warnings from Xcode when compiling scheme.c.
Merge change 184399 (avoid warnings from Xcode) from scheme.c to scheme-advanced.c.
Avoid "discard qualifiers" error from Xcode.
Catch-up merge from master sources to nailboard branch.