fix compiler warnings as errors in diffusion module
Merge branch 'bug-18082-ClangCompileError'