MT#62181 add missing initialiser

Fixes:

In file included from RoomInfo.cpp:2:
In copy constructor ‘constexpr ConferenceRoomParticipant::ConferenceRoomParticipant(const ConferenceRoomParticipant&)’,
    inlined from ‘constexpr _Tp* std::construct_at(_Tp*, _Args&& ...) [with _Tp = ConferenceRoomParticipant; _Args = {ConferenceRoomParticipant}]’ at /usr/include/c++/15/bits/stl_construct.h:110:9,
    inlined from ‘static constexpr void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = ConferenceRoomParticipant; _Args = {ConferenceRoomParticipant}; _Tp = std::_List_node<ConferenceRoomParticipant>]’ at /usr/include/c++/15/bits/alloc_traits.h:676:21,
    inlined from ‘std::__cxx11::list<_Tp, _Allocator>::_Node_ptr std::__cxx11::list<_Tp, _Allocator>::_M_create_node(_Args&& ...) [with _Args = {ConferenceRoomParticipant}; _Tp = ConferenceRoomParticipant; _Alloc = std::allocator<ConferenceRoomParticipant>]’ at /usr/include/c++/15/bits/stl_list.h:1106:33,
    inlined from ‘void std::__cxx11::list<_Tp, _Allocator>::_M_insert(iterator, _Args&& ...) [with _Args = {ConferenceRoomParticipant}; _Tp = ConferenceRoomParticipant; _Alloc = std::allocator<ConferenceRoomParticipant>]’ at /usr/include/c++/15/bits/stl_list.h:2472:35,
    inlined from ‘void std::__cxx11::list<_Tp, _Allocator>::push_back(value_type&&) [with _Tp = ConferenceRoomParticipant; _Alloc = std::allocator<ConferenceRoomParticipant>]’ at /usr/include/c++/15/bits/stl_list.h:1809:24,
    inlined from ‘void ConferenceRoom::newParticipant(const std::string&, const std::string&, const std::string&)’ at RoomInfo.cpp:101:25:
RoomInfo.h:20:8: warning: ‘<unnamed>.ConferenceRoomParticipant::last_access_time’ is used uninitialized [-Wuninitialized]
   20 | struct ConferenceRoomParticipant {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~
RoomInfo.cpp: In member function ‘void ConferenceRoom::newParticipant(const std::string&, const std::string&, const std::string&)’:
RoomInfo.cpp:101:52: note: ‘<anonymous>’ declared here
  101 |   participants.push_back(ConferenceRoomParticipant());
      |                                                    ^

Change-Id: I937128861c2a3059e4c0ec6ede33f34ec500a496
mr26.1.1
Richard Fuchs 7 months ago
parent 8201831cd4
commit 3e9883ae19

@ -35,7 +35,7 @@ struct ConferenceRoomParticipant {
int muted;
struct timeval last_access_time;
struct timeval last_access_time {};
ConferenceRoomParticipant()
: status(Disconnected), muted(0) { }

Loading…
Cancel
Save