Ticket #3216 (closed Bugs: fixed)
variable shadowing with possibly bad implications
|Reported by:||Arne Juul <arnej@…>||Owned by:||chris_kohlhoff|
we usually compile our code with -Wshadow using gcc; this usually reports lots of shadowing in the boost headers. Most of this is just annoying noise, but I've found one issue in the file boost_1_39_0/boost/asio/detail/reactive_socket_service.hpp where the name "ec" is used first as a reference parameter and then redeclared and used as a local variable. It seems to me that some of the uses after this point may have intended to save state back in the reference variable, so this code should be carefully reviewed. At the very least, some better variable names should be chosen so it's clear what the intended logic was.
I have a patch that renames both "ec" variables without changing the semantics of the code (attached).
- Owner set to chris_kohlhoff
- Component changed from None to asio