MINOR: h3/qpack: fix gcc11 warnings
Fix minor warnings about unused variables and mixed declarations. This addresses in part github issue #1445.
This commit is contained in:
parent
87e7eafde4
commit
3cae4049b0
9
src/h3.c
9
src/h3.c
|
@ -133,16 +133,17 @@ static int h3_decode_qcs(struct qcs *qcs, void *ctx)
|
||||||
{
|
{
|
||||||
const unsigned char *buf = (const unsigned char *)b_head(rxbuf);
|
const unsigned char *buf = (const unsigned char *)b_head(rxbuf);
|
||||||
size_t len = b_data(rxbuf);
|
size_t len = b_data(rxbuf);
|
||||||
|
struct buffer htx_buf = BUF_NULL;
|
||||||
struct buffer *tmp = get_trash_chunk();
|
struct buffer *tmp = get_trash_chunk();
|
||||||
struct ist meth = IST_NULL, path = IST_NULL;
|
struct ist meth = IST_NULL, path = IST_NULL;
|
||||||
struct ist scheme = IST_NULL, authority = IST_NULL;
|
//struct ist scheme = IST_NULL, authority = IST_NULL;
|
||||||
|
struct ist authority = IST_NULL;
|
||||||
|
|
||||||
if (qpack_decode_fs(buf, len, tmp, list) < 0) {
|
if (qpack_decode_fs(buf, len, tmp, list) < 0) {
|
||||||
h3->err = QPACK_DECOMPRESSION_FAILED;
|
h3->err = QPACK_DECOMPRESSION_FAILED;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct buffer htx_buf = BUF_NULL;
|
|
||||||
b_alloc(&htx_buf);
|
b_alloc(&htx_buf);
|
||||||
htx = htx_from_buf(&htx_buf);
|
htx = htx_from_buf(&htx_buf);
|
||||||
|
|
||||||
|
@ -158,8 +159,8 @@ static int h3_decode_qcs(struct qcs *qcs, void *ctx)
|
||||||
meth = list[hdr_idx].v;
|
meth = list[hdr_idx].v;
|
||||||
else if (isteq(list[hdr_idx].n, ist(":path")))
|
else if (isteq(list[hdr_idx].n, ist(":path")))
|
||||||
path = list[hdr_idx].v;
|
path = list[hdr_idx].v;
|
||||||
else if (isteq(list[hdr_idx].n, ist(":scheme")))
|
//else if (isteq(list[hdr_idx].n, ist(":scheme")))
|
||||||
scheme = list[hdr_idx].v;
|
// scheme = list[hdr_idx].v;
|
||||||
else if (isteq(list[hdr_idx].n, ist(":authority")))
|
else if (isteq(list[hdr_idx].n, ist(":authority")))
|
||||||
authority = list[hdr_idx].v;
|
authority = list[hdr_idx].v;
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,13 +120,14 @@ int qpack_encode_int_status(struct buffer *out, unsigned int status)
|
||||||
/* Returns 0 on success else non-zero. */
|
/* Returns 0 on success else non-zero. */
|
||||||
int qpack_encode_field_section_line(struct buffer *out)
|
int qpack_encode_field_section_line(struct buffer *out)
|
||||||
{
|
{
|
||||||
if (b_room(out) < 2)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
char qpack_field_section[] = {
|
char qpack_field_section[] = {
|
||||||
'\x00', /* required insert count */
|
'\x00', /* required insert count */
|
||||||
'\x00', /* S + delta base */
|
'\x00', /* S + delta base */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (b_room(out) < 2)
|
||||||
|
return 1;
|
||||||
|
|
||||||
b_putblk(out, qpack_field_section, 2);
|
b_putblk(out, qpack_field_section, 2);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue