I have some legacy C code that I compiled with gcc version 4.9.2 on Linux with return-type warning on [-Wreturn-type]. I have a function as below:
int somefn() {
// .. do something ..
// no explicit return statement
}
and the caller had the call as below:
if (somefn()){
// handling of success
}
else {
// handling of failure
}
When warnings were suppressed, compilation+linking went all ok, and at runtime, we may get surprises, What could go wrong?