server: fix warnings on some platforms on incompatible pointer type