Fix Cast Code

Eliminate a cast and resulting cast-qual warning by using a temporary
as the target of memcpy.
Fix Cast

Avoid a cast-away-const error by properly using const_cast<>.
Fix Const Cast

Do proper casting to avoid a cast-away-const error.
Fix Casting

Make the const_cast explicit to silence a compiler warning.
Fix Cast

Properly use const_cast to fix a cast-away-const error.
Fix Casting

Use const_cast<> to avoid a cast-away-const error.
Fix Casting

Use const_cast<> to avoid a cast-away-const error.
Fix Casting

Use const_cast<> to avoid a cast-away-const error.
Fix Casting

Use const_cast<> to avoid a cast-away-const error.
<rdar://problem/13011717>

Fixed a compilation error where NULL was being assigned to a uint.