clean build warning related encoder

same with pull request #877