[#858] fix warnings from -O3 build