Fix potential issues on scalar type conversion
Detection of potential conversion issues was activated using -Wconversion compiler option lead to new warnings. Fix those warnings, including some fixes for potential issues.
Detection of potential conversion issues was activated using -Wconversion compiler option lead to new warnings. Fix those warnings, including some fixes for potential issues.