Revert "disable compile2.c and remove warnings"

This reverts commit d85d9004bfd7dba70b3a58eb51e157eb6a1fc040.
remove compiler warnings (this commit is introduced at d85d90)
update compile2
refactor