Fix some cppcheck warning

2 jobs for master in 26 minutes and 26 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #70668
build_clazy_clang_tidy

00:26:26

passed #70667
linux kf5-qt5 qt5.12

00:19:43

11.0%