bfcp: fix win32 warning
@@ -64,7 +64,8 @@ static int attr_encode(struct mbuf *mb, bool mand, enum bfcp_attrib type,
const struct bfcp_supprim *supprim = v;
const enum bfcp_priority *priority = v;
const uint16_t *u16 = v;
- size_t start, len, i;
+ size_t start, i;
+ uint8_t len;
int err;
start = mb->pos;
@@ -124,7 +125,7 @@ static int attr_encode(struct mbuf *mb, bool mand, enum bfcp_attrib type,
}
/* header */
- len = mb->pos - start;
+ len = (uint8_t)(mb->pos - start);
mb->pos = start;
err |= mbuf_write_u8(mb, (type<<1) | (mand ? 1 : 0));
