Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDE Compilation results on "non-void-error" in two code lines #2

Open
KayGundhardt opened this issue Jan 15, 2023 · 1 comment
Open

Comments

@KayGundhardt
Copy link

Hello Everybody,
Hi AussieMakerGeek,

I´m getting Error:

/ESP8266_MQTT_Coffee_Machine/ESP8266_MQTT_Coffee_Machine.ino: In function 'byte fromCoffeemaker(byte, byte, byte, byte)':
/ESP8266_MQTT_Coffee_Machine/ESP8266_MQTT_Coffee_Machine.ino:118:1: error: no return statement in function returning non-void [-Werror=return-type]
  118 | }
      | ^
/ESP8266_MQTT_Coffee_Machine/ESP8266_MQTT_Coffee_Machine.ino: In function 'byte toCoffeemaker(byte)':
/ESP8266_MQTT_Coffee_Machine/ESP8266_MQTT_Coffee_Machine.ino:157:1: error: no return statement in function returning non-void [-Werror=return-type]
  157 | }
      | ^

using
Arduino IDE V2.0.3
PubSubClient V2.8.0
esp8266 V3.1.1

with
NodeMCU 1.0 (ESP-12E)

Any help would be really appreciated! :)

@AussieMakerGeek
Copy link
Owner

This seems to be something in the newer Arduino versions - Basically, the function is set to return a value, but doesn't. This must have previously been ok but not anymore.

Since there is no need to actually return a value all you should need to do is change:
byte toCoffeemaker(byte)
to
void toCoffeemaker(byte)

and the same to 'fromCoffeeMaker' function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants