How can i remove annoying warning "non-void function does not return a value in all control paths" ? There are some explanation of my code: