remove unused parameters and fix warnings in gcc
fix compile error