You've already forked Adafruit_MQTT_Library
mirror of
https://github.com/adafruit/Adafruit_MQTT_Library.git
synced 2025-07-27 15:01:49 +03:00
Add parenthesis to fix compiler warning
Gcc warns when using = where == seems logical, and adding parenthesis tells gcc you really mean =.
This commit is contained in:
@ -121,7 +121,7 @@ void loop() {
|
|||||||
|
|
||||||
// this is our 'wait for incoming subscription packets' busy subloop
|
// this is our 'wait for incoming subscription packets' busy subloop
|
||||||
Adafruit_MQTT_Subscribe *subscription;
|
Adafruit_MQTT_Subscribe *subscription;
|
||||||
while (subscription = mqtt.readSubscription(1000)) {
|
while ((subscription = mqtt.readSubscription(1000))) {
|
||||||
if (subscription == &onoffbutton) {
|
if (subscription == &onoffbutton) {
|
||||||
Serial.print(F("Got: "));
|
Serial.print(F("Got: "));
|
||||||
Serial.println((char *)onoffbutton.lastread);
|
Serial.println((char *)onoffbutton.lastread);
|
||||||
|
@ -104,7 +104,7 @@ void loop() {
|
|||||||
|
|
||||||
// this is our 'wait for incoming subscription packets' busy subloop
|
// this is our 'wait for incoming subscription packets' busy subloop
|
||||||
Adafruit_MQTT_Subscribe *subscription;
|
Adafruit_MQTT_Subscribe *subscription;
|
||||||
while (subscription = mqtt.readSubscription(1000)) {
|
while ((subscription = mqtt.readSubscription(1000))) {
|
||||||
if (subscription == &onoffbutton) {
|
if (subscription == &onoffbutton) {
|
||||||
Serial.print(F("Got: "));
|
Serial.print(F("Got: "));
|
||||||
Serial.println((char *)onoffbutton.lastread);
|
Serial.println((char *)onoffbutton.lastread);
|
||||||
|
@ -144,7 +144,7 @@ void loop() {
|
|||||||
|
|
||||||
// this is our 'wait for incoming subscription packets' busy subloop
|
// this is our 'wait for incoming subscription packets' busy subloop
|
||||||
Adafruit_MQTT_Subscribe *subscription;
|
Adafruit_MQTT_Subscribe *subscription;
|
||||||
while (subscription = mqtt.readSubscription(5000)) {
|
while ((subscription = mqtt.readSubscription(5000))) {
|
||||||
if (subscription == &onoffbutton) {
|
if (subscription == &onoffbutton) {
|
||||||
Serial.print(F("Got: "));
|
Serial.print(F("Got: "));
|
||||||
Serial.println((char *)onoffbutton.lastread);
|
Serial.println((char *)onoffbutton.lastread);
|
||||||
|
Reference in New Issue
Block a user