In most cases, we have the option of changing the return type - or if not, then we can define a replacement function and possibly mark the old one deprecated. As such, there is rarely need to consider what you may want to return in future. So, choose the return type of the function based on what it does now. If it doesn't return an error code or anything else, then return void
.
In the case you really have no option to change the return type later, you are in a situation where you have no room for experimentation. You must decide initially whether you should return an error code or not.
P.S. Integers are not an ideal form of error reporting. Consider something else such as exceptions, Boost.Outcome or at least std::error_code
.