Fix several -Wconversion warnings from GCC inside the static inline functions.