sophia: fix optimized build warnings