Fix "warning: assigned but unused variable - task"
#26284

kamipo wants to merge kamipo:fix_warnig into rails:master

We do not currently have an analysis of these two commits