Example

int function(int &a, int &b){
a++;   
return b;
}

Solution
Pass built in types by value if they are not modified.

int function(int &a, int b){
a++;   
return b;
}