Fix MSVC warning C4244.

This warns about potential value truncation.  Instead of disabling
the warning, fix it, generally by adding explicit casts to make it
clear that a type change is occurring.

Change-Id: I737f9080a86adeaa2afb461fe9429dc1dcb5d6c3
Reviewed-on: https://code-review.googlesource.com/1441
Reviewed-by: Paul Wankadia <junyer@google.com>
11 files changed