Fixed unused variables in generated code
Fixes suggested by static analyzer