class.c and numeric.c: fixed MSVC warnings
Merge pull request #1446 from cremno/casts

MSVC: fix warnings