Why do you have line 41 in that function? It will just repeat an unlimited amount of times like the error says. What are you trying to achieve?
*edit
Also there are more returns types than just int. You should probably put void and not return anything since you arne't even using the value that is being returned. Most of the time when you pass by references or pointers and you modify the variables directly you will return void unless you are returning an error code but that doesn't seem to be the case.
Also you forgot to give parameter names on line 33.