expanseElectronics / ethernetNodes

Ethernet version of our artnetnode project.
https://expanseelectronics.com/
5 stars 4 forks source link

Compile Error: Control reaches end of non-void function #8

Open Gandalf1783 opened 8 months ago

Gandalf1783 commented 8 months ago

There is a fix needed in 2 of the files.

They dont return any value. Since I dont know which values these are, I just inserted what made most sense to me.

I'll try to get a pull-request running with the necessary fixes.

Gandalf1783 commented 8 months ago

At ajax.ino at line 330 is no return value specified. At least my Arduino IDE under Linux is not happy with that.

Likewise, the ethEspArtNetRDM.cpp has no return value for bool esp8266ArtNetRDM::closePort(uint8_t g, uint8_t p)at line 223/224.

Which are matching values? I assume that line 223/224 has to be "return true;" since it closes the port and thats the return value given above for an already closed port.

I am unsure though about the ajax case.

LoneWalkerWolf commented 7 months ago

On line 330, case 7 was the ajax load for when we were wanting to implement Artnet capture / playback. We removed the menu option from the HTML however we've left this in the ajax code, incase we wanted to come back to it. (should have commented the code haha)

Yes, bool esp8266ArtNetRDM::closePort(uint8_t g, uint8_t p) should return True. We already return True if the port is already closed. (see screenshot)

image

Gandalf1783 commented 6 months ago

May I ask how you compile this with the given errors? Different C Standard?

Seems to me like this is a compiler dependent issue and different depending on your exact setup/architecture.

Gandalf1783 commented 5 months ago

Bump