[tcp] Avoid printf format warnings on some compilers