Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Compilation error: no return statement in function returning non-void [-Werror=return-type] #39

Open
vinaypatil-132 opened this issue Feb 9, 2023 · 1 comment

Comments

@vinaypatil-132
Copy link

plz help me out form this error " Compilation error: no return statement in function returning non-void [-Werror=return-type] "

@Poko-Apps
Copy link

Poko-Apps commented Feb 10, 2023

Hey there .
'postedSSID' function supposed to return a String value , but it's not returning any hence the error .
Even though i don't know what this function supposed to return but still heres a quick fix until original dev fix it .
At the end of that function place a line like this --

return header("Posted SSID") + newSSID + footer();

the final code should look like this (below)

String postedSSID() {
  String postedSSID = input("s"); newSSID="<li><b>" + postedSSID + "</b></li>";
  for (int i = 0; i < postedSSID.length(); ++i) {
    EEPROM.write(i, postedSSID[i]);
  }
  EEPROM.write(postedSSID.length(), '\0');
  EEPROM.commit();
  WiFi.softAP(postedSSID);
  return header("Posted SSID") + newSSID + footer();
}

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

No branches or pull requests

2 participants