Fixed printf format warnings

Small changes pre-upstream merge.