adamff-dev / ESP8266-Captive-Portal

:key: WiFi captive portal for ESP8266 for phishing WiFi passwords
MIT License
734 stars 150 forks source link

exit status 1- Compilation error: no return statement in function returning non-void [-Werror=return-type] #38

Open angelomarzolla opened 1 year ago

angelomarzolla commented 1 year ago

exit status 1- Compilation error: no return statement in function returning non-void [-Werror=return-type]

angelomarzolla commented 1 year ago

.

Poko-Apps commented 1 year ago

Consider visiting this until dev push some fix https://github.com/adamff1/ESP8266-Captive-Portal/issues/39#issuecomment-1425159670

Danysevian commented 1 year ago

exit status 1- Compilation error: no return statement in function returning non-void [-Werror=return-type]

you just need add in the String postedSSID() this line:

return postedSSID;

should be like this:

String postedSSID() { String postedSSID = input("s"); newSSID = "

  • " + postedSSID + "
  • "; for (int i = 0; i < postedSSID.length(); ++i) { EEPROM.write(i, postedSSID[i]); } EEPROM.write(postedSSID.length(), '\0'); EEPROM.commit(); WiFi.softAP(postedSSID); return postedSSID; //this is the adding line }