Fix analysis warning for SonarCloud (#10894)