diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 532a224732..cea664f64d 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -604,7 +604,9 @@ SSdbRaw *mndConsumerActionEncode(SMqConsumerObj *pConsumer) { if (buf == NULL) goto CM_ENCODE_OVER; void *abuf = buf; - tEncodeSMqConsumerObj(&abuf, pConsumer); + if(tEncodeSMqConsumerObj(&abuf, pConsumer) < 0){ + goto CM_ENCODE_OVER; + } int32_t dataPos = 0; SDB_SET_INT32(pRaw, dataPos, tlen, CM_ENCODE_OVER); diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index 731e25175f..ec915eb9d8 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -1109,7 +1109,9 @@ static SSdbRaw *mndSubActionEncode(SMqSubscribeObj *pSub) { if (buf == NULL) goto SUB_ENCODE_OVER; void *abuf = buf; - tEncodeSubscribeObj(&abuf, pSub); + if (tEncodeSubscribeObj(&abuf, pSub) < 0){ + goto SUB_ENCODE_OVER; + } int32_t dataPos = 0; SDB_SET_INT32(pRaw, dataPos, tlen, SUB_ENCODE_OVER); @@ -1342,7 +1344,7 @@ static int32_t buildResult(SSDataBlock *pBlock, int32_t *numOfRows, int64_t cons // consumer id char consumerIdHex[32] = {0}; - sprintf(varDataVal(consumerIdHex), "0x%" PRIx64, consumerId); + (void)sprintf(varDataVal(consumerIdHex), "0x%" PRIx64, consumerId); varDataSetLen(consumerIdHex, strlen(varDataVal(consumerIdHex))); pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index 959a3ef008..2fb0870ed6 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -134,7 +134,9 @@ SSdbRaw *mndTopicActionEncode(SMqTopicObj *pTopic) { goto TOPIC_ENCODE_OVER; } void *aswBuf = swBuf; - taosEncodeSSchemaWrapper(&aswBuf, &pTopic->schema); + if(taosEncodeSSchemaWrapper(&aswBuf, &pTopic->schema) < 0){ + goto TOPIC_ENCODE_OVER; + } SDB_SET_BINARY(pRaw, dataPos, swBuf, schemaLen, TOPIC_ENCODE_OVER); } @@ -264,7 +266,7 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) { } int16_t colId; SDB_GET_INT16(pRaw, dataPos, &colId, TOPIC_DECODE_OVER); - taosArrayPush(pTopic->ntbColIds, &colId); + (void)taosArrayPush(pTopic->ntbColIds, &colId); } SDB_GET_INT64(pRaw, dataPos, &pTopic->ctbStbUid, TOPIC_DECODE_OVER);