add many hardening gcc flags
fix unused parameters
clean code