Replace warn() and warnx() with fprintf() and add <stdio.h> where necessary.
This brings us a lot more tidiness.