Should the _code param be unsigned? Is there a risk of truncation?