------------------------------------------------------------ revno: 14006 revision-id: squid3@treenet.co.nz-20160323143723-88l17xribzr5g8q1 parent: squid3@treenet.co.nz-20160323140531-1rxu73rh74tac7p6 author: Alex Rousskov committer: Amos Jeffries branch nick: 3.5 timestamp: Thu 2016-03-24 03:37:23 +1300 message: Detect when a child method declaration hides parent's virtual method. Adding -Woverloaded-virtual exposed one problem in the existing code. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20160323143723-88l17xribzr5g8q1 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # testament_sha1: 0e7bbd2f281e70385e452a4845de4d7a13439ea9 # timestamp: 2016-03-23 14:51:00 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5 # base_revision_id: squid3@treenet.co.nz-20160323140531-\ # 1rxu73rh74tac7p6 # # Begin patch === modified file 'configure.ac' --- configure.ac 2016-02-25 19:37:00 +0000 +++ configure.ac 2016-03-23 14:37:23 +0000 @@ -371,7 +371,7 @@ SQUID_CFLAGS="$squid_cv_cc_option_wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments -Wshadow" ;; esac - SQUID_CXXFLAGS="$squid_cv_cc_option_wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow" + SQUID_CXXFLAGS="$squid_cv_cc_option_wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Woverloaded-virtual" else SQUID_CFLAGS= SQUID_CXXFLAGS= === modified file 'src/clients/FtpRelay.cc' --- src/clients/FtpRelay.cc 2016-03-15 17:33:14 +0000 +++ src/clients/FtpRelay.cc 2016-03-23 14:37:23 +0000 @@ -42,7 +42,7 @@ void serverState(const Ftp::ServerState newState); /* Ftp::Client API */ - virtual void failed(err_type error = ERR_NONE, int xerrno = 0); + virtual void failed(err_type error = ERR_NONE, int xerrno = 0, ErrorState *ftperr = nullptr); virtual void dataChannelConnected(const CommConnectCbParams &io); /* Client API */ @@ -272,7 +272,7 @@ } void -Ftp::Relay::failed(err_type error, int xerrno) +Ftp::Relay::failed(err_type error, int xerrno, ErrorState *ftpErr) { if (!doneWithServer()) serverState(fssError); @@ -281,7 +281,7 @@ if (entry->isEmpty()) failedErrorMessage(error, xerrno); // as a reply - Ftp::Client::failed(error, xerrno); + Ftp::Client::failed(error, xerrno, ftpErr); } void