I received an error during compilation:
src/smtp.c:208:1: warning: control reaches end of non-void function [-Wreturn-type]
Here's the relevant code
int smtp_test_method(int socket)
{
int smtp_code;
if ((smtp_code = smtp_speak(socket, "VRFY root\r\n")) == 501 ||
smtp_code == 250 ||
smtp_code == 252)
return 0;
else if ((smtp_code = smtp_speak(socket,
"MAIL FROM:test@test.com\r\n")) == 250) {
if ((smtp_code = smtp_speak(socket, "RCPT TO:root\r\n")) == 250 ||
smtp_code == 550)
return 1;
} else
return smtp_code;
}
Where smtp_speak is a function that connects/EHLO's to a server and then sends a message, returning the response code as an int. Why am I getting this error?