added warning compilation flags, fixed their occurrences