Fix unref param and uint <-> int conversion warnings.