[squid-dev] [PATCH] g++ -Woverloaded-virtual

Amos Jeffries squid3 at treenet.co.nz
Sun Mar 13 03:10:13 UTC 2016


On 12/03/2016 7:41 p.m., Alex Rousskov wrote:
> Hello,
> 
>     I accidentally discovered that Squid does not use
> -Woverloaded-virtual when compiled with GCC. I found that warning useful
> in other projects. Enabling it for Squid exposes one bug-in-the-making:
> It looks like an 3rd Ftp::Relay::failed() argument was forgotten. The
> attached patch enables the warning and probably fixes Ftp::Relay::failed().
> 
> Do we want to add this warning?

We do IMO.

> 
> Disclaimer: The Ftp::Relay::failed() fix is correct from removing the
> warning point of view, but I have not checked whether the patched code
> handles non-nil ftpErr correctly. AFAICT, this method is never called
> with non-nil ftpErr today, but that may change.
> 

Checked. It does well enough that this is not adding any new bugs.
Though some of the existing bugs might be tracked back to this call
sequence not happening properly as-is.

+!.

Amos



More information about the squid-dev mailing list