fixing cppcheck warnings in error injection tests