The warning (converted to an error due to the
-Werror option to
clang on the appliance)
control may reach end of non-void function
Says that you've a function in your program that's declared to return a value, but it's not guaranteed that it will.
foo(), in the following piece of code, is declared to return an
However, you're not explicitly returning anything in case the
if condition is not executed as it's the case. And that's what's meant by control may reach the end of non-void function.
Edit: when you get a compilation error, This means that the compilation process was not successful. Thus, you still don't get the executable file that you'll use to run the program (namely
find). And that's why when you try to run
it tells you that there's no such file. To fix that, you should first fix the previous error, run
if you no longer get any compilation error, then you're ready to run your program.