Re #7480. Remove variable that's not used in anger.
Re #7480. Need a cast to avoid the warning.
Merge branch 'bugfix/7480_gcc_compiler_warnings' into develop