Opened 10 years ago

Closed 9 years ago

#8347 closed Bugs (fixed)

io_op::want_ uninitialized in c'tor

Reported by: Richard <legalize@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.52.0 Severity: Cosmetic
Keywords: Cc:

Description

template <typename Stream, typename Operation, typename Handler> class io_op { public:

io_op(Stream& next_layer, stream_core& core,

const Operation& op, Handler& handler)

: next_layer_(next_layer),

core_(core), op_(op), bytes_transferred_(0), handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))

{

CID 10923 (#4-6 of 6): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member "want_" is not initialized in this constructor nor in any functions that it calls.

}

Change History (2)

comment:1 by chris_kohlhoff, 9 years ago

Severity: ProblemCosmetic

This warning seems to be a cosmetic issue only. The want_ variable is set and used in io_op::operator(), and this precedes any other call that may use it (e.g. a copy or move constructor).

comment:2 by chris_kohlhoff, 9 years ago

Resolution: fixed
Status: newclosed

Fixed on trunk in [85743]. Merged to release in [85838].

Note: See TracTickets for help on using tickets.