encoder: fix warning of potentially unused locals