static analyze: cleanup unused local variables