Generators: fix cppcheck defects

Fix defects as seen in !76498 (closed) (uninitialized variables and by-value refs).

Merge request reports

Loading