Fix some warnings and a compile error with icc