terrorsl / sMQTTBroker

Simple MQTT broker
MIT License
70 stars 19 forks source link

Reduce warnings with C++17 #39

Closed PBrunot closed 11 months ago

PBrunot commented 11 months ago

This PR reduces the warnings emitted by compiler C++17 and better. This is important because I aim to compile myproject with -Wall -Wextra but platformio does not allow setting up different flags for libraries to selectively ignore warnings not in my code. This covers some of the points raised in PR #24

The depreciation warnings remains because I did not find a good way to remove them considering the deprecated functions are used internally to the library, and can't be made private without some refactoring.

terrorsl commented 11 months ago

I think it's better to do it by checking the __cplusplus version so as not to break the build for people who use an older standard