Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
98ae9d04 by Alexandre Janniaux at 2026-01-24T03:55:14+00:00
chromecast: fix member initialization order warning

Fix -Wreorder warning by moving m_device_name initializer to match
the declaration order in the header file.

        In file included from 
../modules/stream_out/chromecast/chromecast_ctrl.cpp:34:
        ../modules/stream_out/chromecast/chromecast.h: In constructor 
‘intf_sys_t::intf_sys_t(vlc_object_t*, int, std::string, int, httpd_host_t*)’:
        ../modules/stream_out/chromecast/chromecast.h:312:13: warning: 
‘intf_sys_t::m_pingRetriesLeft’ will be initialized after [-Wreorder]
          312 |     uint8_t m_pingRetriesLeft;
              |             ^~~~~~~~~~~~~~~~~
        ../modules/stream_out/chromecast/chromecast.h:254:20: warning:   
‘std::string intf_sys_t::m_device_name’ [-Wreorder]
          254 |     std::string    m_device_name;
              |                    ^~~~~~~~~~~~~
        ../modules/stream_out/chromecast/chromecast_ctrl.cpp:128:1: warning:   
when initialized here [-Wreorder]
          128 | intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int port, 
std::string device_addr,
              | ^~~~~~~~~~

- - - - -


1 changed file:

- modules/stream_out/chromecast/chromecast_ctrl.cpp


Changes:

=====================================
modules/stream_out/chromecast/chromecast_ctrl.cpp
=====================================
@@ -130,6 +130,7 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
  : m_module(p_this)
  , m_device_port(device_port)
  , m_device_addr(device_addr)
+ , m_device_name(_("Unknown"))
  , m_last_request_id( 0 )
  , m_mediaSessionId( 0 )
  , m_on_input_event( NULL )
@@ -154,7 +155,6 @@ intf_sys_t::intf_sys_t(vlc_object_t * const p_this, int 
port, std::string device
  , m_cc_time_date( VLC_TICK_INVALID )
  , m_cc_time( VLC_TICK_INVALID )
  , m_pingRetriesLeft( PING_WAIT_RETRIES )
- , m_device_name(_("Unknown"))
 {
     m_communication = new ChromecastCommunication( p_this,
         getHttpStreamPath(), getHttpStreamPort(),



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/98ae9d046838e119c7afb1a781745a5279b698e9

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/98ae9d046838e119c7afb1a781745a5279b698e9
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to