PangolinMQTT icon indicating copy to clipboard operation
PangolinMQTT copied to clipboard

Compiler warns/fails with "will be initialized after [-Werror=reorder]" warning

Open smuellener opened this issue 3 years ago • 0 comments

There are multiple cases where members in the initializer list of classes have the wrong order. (see https://stackoverflow.com/questions/1564937/gcc-warning-will-be-initialized-after)

E.g.

PangolinMQTT\src\Packet.h:37:34: error: 'Packet::_controlcode' will be initialized after [-Werror=reorder] PangolinMQTT\src\Packet.h:36:41: error: 'bool Packet::_hasId' [-Werror=reorder] PangolinMQTT\src\Packet.h:51:9: error: when initialized here [-Werror=reorder]

Or also in AardvarkTCP\src\mbx.h

It would be great if you could ensure that the order is correct. I could also create pull requests for this if preferred..

Thank you, very excited to try this library!

smuellener avatar Jun 16 '21 13:06 smuellener