Fix warnings

Merge request !653 (merged) fixed many of warnings issued by otb CI build, but there are many warnings remaining, in particular on windows builds. They should be fixed!