Fix usage of uninitialized variable on 32 bit architectures
Fix for "comparison is always true due to limited range of data type" errors

Seen for Fedora compilation on ARM architecture where "char" is unsigned.
Fix type narrowing conversion failures

This is seen on ppc64. Error messages like this one:
narrowing conversion of 'ecode' from 'int' to 'kXR_unt32 {aka unsigned int}' inside { }