Hello,
I startet a build of the SNMP++ 3.4.1 and Agent++ 4.3.1 and saw build warnings:
In file included from ../src/uxsnmp.cpp:53:0:
../include/snmp_pp/uxsnmp.h: In constructor 'Snmp_pp::Snmp::Snmp(int&, short unsigned int, bool)':
../include/snmp_pp/uxsnmp.h:671:7: warning: 'Snmp_pp::Snmp::m_pollTimeOut' will be initialized after [-Wreorder]
int m_pollTimeOut;
^
../include/snmp_pp/uxsnmp.h:649:9: warning: 'Snmp_pp::v3MP* Snmp_pp::Snmp::mpv3' [-Wreorder]
v3MP* mpv3;
^
../src/uxsnmp.cpp:626:1: warning: when initialized here [-Wreorder]
Snmp::Snmp(int &status, const unsigned short port, const bool bind_ipv6)
^
In file included from ../src/uxsnmp.cpp:53:0:
../include/snmp_pp/uxsnmp.h: In constructor 'Snmp_pp::Snmp::Snmp(int&, const Snmp_pp::UdpAddress&)':
../include/snmp_pp/uxsnmp.h:671:7: warning: 'Snmp_pp::Snmp::m_pollTimeOut' will be initialized after [-Wreorder]
int m_pollTimeOut;
^
../include/snmp_pp/uxsnmp.h:649:9: warning: 'Snmp_pp::v3MP* Snmp_pp::Snmp::mpv3' [-Wreorder]
v3MP* mpv3;
^
../src/uxsnmp.cpp:656:1: warning: when initialized here [-Wreorder]
Snmp::Snmp( int &status, const UdpAddress& addr)
^
In file included from ../src/uxsnmp.cpp:53:0:
../include/snmp_pp/uxsnmp.h: In constructor 'Snmp_pp::Snmp::Snmp(int&, const Snmp_pp::UdpAddress&, const Snmp_pp::UdpAddress&)':
../include/snmp_pp/uxsnmp.h:671:7: warning: 'Snmp_pp::Snmp::m_pollTimeOut' will be initialized after [-Wreorder]
int m_pollTimeOut;
^
../include/snmp_pp/uxsnmp.h:649:9: warning: 'Snmp_pp::v3MP* Snmp_pp::Snmp::mpv3' [-Wreorder]
v3MP* mpv3;
^
../src/uxsnmp.cpp:681:1: warning: when initialized here [-Wreorder]
Snmp::Snmp( int &status, const UdpAddress& addr_v4,
I think the v3MP* mpv3; must be placed in the private part in correct order because of the -Wreorder warning. Correct?
private:
bool m_isThreadRunning;
int m_pollTimeOut;
#ifdef _SNMPv3
v3MP* mpv3;
#endif