terrorsl / sMQTTBroker

Simple MQTT broker
MIT License
70 stars 19 forks source link

please amend: some warnings being treated as errors #23

Closed sosandstrom closed 1 year ago

sosandstrom commented 2 years ago

When using arduino / compile-sketches action, the default compiler settings includes some warnings being treated as errors.

For a good library like sMQTTBroker, please amend these warnings, rather than having your users ignore them.

In file included from /home/sosandstrom/Arduino/libraries/sMQTTBroker/src/sMQTTClient.h:4,
[306](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:318)
                   from /home/sosandstrom/Arduino/libraries/sMQTTBroker/src/sMQTTBroker.h:5,
[307](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:319)
                   from /home/sosandstrom/github-runners/elmeter-cloud/_work/device-8266/device-8266/local_mqtt.h:4,
[308](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:320)
                   from /home/sosandstrom/github-runners/elmeter-cloud/_work/device-8266/device-8266/device-8266.ino:15:
[309](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:321)
  /home/sosandstrom/Arduino/libraries/sMQTTBroker/src/sMQTTMessage.h:14:20: error: 'debugMessageType' defined but not used [-Werror=unused-variable]
[310](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:322)
   static const char *debugMessageType[] = {
[311](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:323)
                      ^~~~~~~~~~~~~~~~
[312](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:324)
  In file included from /home/sosandstrom/Arduino/libraries/sMQTTBroker/src/sMQTTBroker.h:4,
[313](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:325)
                   from /home/sosandstrom/github-runners/elmeter-cloud/_work/device-8266/device-8266/local_mqtt.h:4,
[314](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:326)
                   from /home/sosandstrom/github-runners/elmeter-cloud/_work/device-8266/device-8266/device-8266.ino:15:
[315](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:327)
  /home/sosandstrom/Arduino/libraries/sMQTTBroker/src/sMQTTplatform.h:39:20: error: 'SMQTTTAG' defined but not used [-Werror=unused-variable]
[316](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:328)
   static const char *SMQTTTAG = "sMQTTBroker";
[317](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:329)
                      ^~~~~~~~
[318](https://github.com/elmeter-cloud/device-8266/actions/runs/3128082717/jobs/5075472061#step:5:330)
sosandstrom commented 2 years ago

I am drafting a PR

sosandstrom commented 2 years ago

After looking at the code, I am not sure this issue stands.

github-actions[bot] commented 1 year ago

Stale issue message