Skip to content

Commit

Permalink
* FIX [mqtt_tcp] Fix the warnings in compiling.
Browse files Browse the repository at this point in the history
Signed-off-by: wanghaemq <[email protected]>
  • Loading branch information
wanghaEMQ authored and JaylinYu committed Dec 23, 2024
1 parent 8bc759b commit e8b2b0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/mqtt/transport/quic/mqtt_quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ mqtt_quictran_share_qos_send_cb(void *arg, nni_aio *qsaio, quic_substream *strea
mqtt_quictran_pipe *p = arg;
nni_mtx *mtx;
nni_msg *msg;
uint8_t type;
size_t n;
int rv;

Expand Down Expand Up @@ -604,7 +603,6 @@ mqtt_quictran_share_qos_send_cb(void *arg, nni_aio *qsaio, quic_substream *strea
return;
}
if (msg != NULL) {
type = nni_msg_cmd_type(msg);
nni_msg_free(msg);
} else {
log_warn("NULL msg detected in send_cb");
Expand Down Expand Up @@ -1221,7 +1219,7 @@ mqtt_quictran_pipe_send_start(mqtt_quictran_pipe *p)
if (qos > 0)
p->sndmax --;
if (qos > p->qosmax) {
p->qosmax == 1? (*header &= 0XF9) & (*header |= 0X02): NNI_ARG_UNUSED(*header);
p->qosmax == 1 ? ((*header &= 0XF9), (*header |= 0X02)) : NNI_ARG_UNUSED(*header);
p->qosmax == 0? *header &= 0XF9: NNI_ARG_UNUSED(*header);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/mqtt/transport/tcp/mqtt_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,9 +1593,9 @@ static void
mqtt_tcptran_ep_connect(void *arg, nni_aio *aio)
{
mqtt_tcptran_ep *ep = arg;
int rv;
int rv = 0;

if (nni_aio_begin(aio) != 0) {
if ((rv = nni_aio_begin(aio)) != 0) {
log_error("ep connect rv %d", rv);
return;
}
Expand Down

0 comments on commit e8b2b0d

Please sign in to comment.