return-statement

Error on missing return statement

How do I generate an error for a missing return statement under GCC? cpfsfuse.c:184: warning: no return statement in function returning non-void I'm able to return errors for implicit function declaration (-Werror-implicit-function-declaration), and I'm aware of a -Werror= switch, but I can't locate an appropriate warning to promote t...

Python beginner question - trying to understand return statement

Basically I want to return the contents of create_user in the register function to use to save to my database. I am a complete beginner. What am I misunderstanding? def register(): form = SignupForm(request.form) if request.method == 'POST' and form.validate(): create_user = ({'username' : form.username.data, 'email' : form....

return statements inside a function

I was wondering how people handle return statements in a function. I have a method that allocates some memory but has a return false; statement when a function goes wrong. this statement is located about half way through the function so my memory is leaked if that function fails. This isn't the only return ...; statement I have in this f...