Removed Visual Studio 2010 typecast warnings

Added simple typecast to remove multiple typecast warnings reported by Visual Studio compiling in 32 bits target