fix build and test failures on arm64 linux platform (#978)
There are few build and test failures on arm64 platform
with "narrowing conversion" errors. This is due to the char
datatype implementation differences between different platforms
and gcc versions. This commit replaces the char datatype with
the explicit datatype that works across all the platforms.