[cppcheck] fix all 3 errors

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
10 jobs for fix-cppcheck in 0 seconds (queued for 28 seconds)