On 08/02/2010 09:12 AM, n...@squid-cache.org wrote:
"../../../src/comm/ListenStateData.cc", line 189: Error: errcode hides 
Comm::ListenStateData::errcode.

There are more related problems here, besides name hiding.

* Comm::ListenStateData::setListen() sets errcode member on some failures but those failures are not propagated to the caller. That seems wrong.

* The "and accept takes a callback to call" part of the Comm::ListenStateData::setListen() comment does not seem to correspond to the actual setListen() code. May belong to the constructor instead.

* Comm::ListenStateData::notify sets param.errcode but not this->errcode.

* The errcode member documentation ("errno code if any happened so far") is inconsistent with the code because some errors are ignored.

If the errcode member is not meant for outside use, perhaps it is not needed at all. If it is needed outside, its definition should be reviewed and value should be updated accordingly.

HTH,

Alex.

Reply via email to