Recent changes to remove PRIu... in commit:
6cde4b45528e52819c803de92d10d4be3abddf29
causes clang 11 to be unhappy, with length of field warnings.
Modify the offending code to compile properly using that compiler.
I've tested against clang 11 and gcc 9.3
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
if (vd.advertisement_interval != VRRP_DEFAULT_ADVINT && ++writes)
vty_out(vty,
- "vrrp default advertisement-interval %hu\n",
+ "vrrp default advertisement-interval %u\n",
vd.advertisement_interval * CS2MS);
if (vd.preempt_mode != VRRP_DEFAULT_PREEMPT && ++writes)
const struct vrrp_vrouter *vr = arg;
char key[IFNAMSIZ + 64];
- snprintf(key, sizeof(key), "%s@%hhu", vr->ifp->name, vr->vrid);
+ snprintf(key, sizeof(key), "%s@%u", vr->ifp->name, vr->vrid);
return string_hash_make(key);
}
(*pkt)->hdr.chksum, chksum);
/* Type check */
- VRRP_PKT_VCHECK(((*pkt)->hdr.vertype & 0x0F) == 1, "Bad type %hhu",
+ VRRP_PKT_VCHECK(((*pkt)->hdr.vertype & 0x0F) == 1, "Bad type %u",
(*pkt)->hdr.vertype & 0x0f);
/* Exact size check */
continue;
ttable_add_row(
- tt, "%s|%hhu|%hhu|%d|%d|%s|%s",
+ tt, "%s|%u|%hhu|%d|%d|%s|%s",
vr->ifp->name, vr->vrid, vr->priority,
vr->v4->addrs->count, vr->v6->addrs->count,
vr->v4->fsm.state == VRRP_STATE_MASTER ? "Master"