-Wsign-compare
add comment, remove unused functions