serial: fix warnings