Fix warnings to fit Gentoo optimization requirements

This PR intends to solve issue #378