The compiler warnings are good, but they are not enough :). Specialized tools for static analysis, such as PVS-Studio will always outpace the compilers in diagnostic capabilities and configuration flexibility working with false positives. That's actually how the analyzer developers make money. Proofs: https://www.viva64.com/en/inspections/#ID0EAPAG