Invalid W3C with warnings is okay for SEO and ranking. However, having a valid W3C HTML should always be a preferred choice.
Going for a validated W3C HTML code can always help rectify errors and warnings, which are even helpful in SEO, especially providing the alt text for images malformed HTML code.