/Couchbase/Embedded/libnyoci/src/libnyoci/nyoci-outbound.c:647:2: warning: Value stored to 'fmtlen' is never read
fmtlen += self->outbound.content_len;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
I was going to ignore this compiler warning, but then I looked at the code, and it seems like the parameter to nyoci_outbound_set_content_len() should be fmtlen, not len -- the latter is just the space remaining in the packet, while fmtlen is the previous content_len plus the number of bytes written by vsnprintf.
In
nyoci_outbound_append_content_formatted()
, the variablefmtlen
is updated but unused:I was going to ignore this compiler warning, but then I looked at the code, and it seems like the parameter to
nyoci_outbound_set_content_len()
should befmtlen
, notlen
-- the latter is just the space remaining in the packet, whilefmtlen
is the previouscontent_len
plus the number of bytes written byvsnprintf
.