Re #7679. Puting an endif in the right place.
Merge branch 'feature/7679_compiler_warnings' into develop