fix compiler warnings on some platforms