Warning removed unused variable task_name

warning: assigned but unused variable - task_name
Merge pull request #9732 from arunagw/warning_fix_unused_variable

Warning removed unused variable task_name