diff --git a/docs/examples/c/tmq_demo.c b/docs/examples/c/tmq_demo.c index b16245d484..18eef02098 100644 --- a/docs/examples/c/tmq_demo.c +++ b/docs/examples/c/tmq_demo.c @@ -92,7 +92,6 @@ void* prepare_data(void* arg) { // ANCHOR: msg_process int32_t msg_process(TAOS_RES* msg) { - char buf[1024]; // buf to store the row content int32_t rows = 0; const char* topicName = tmq_get_topic_name(msg); const char* dbName = tmq_get_db_name(msg); @@ -371,8 +370,8 @@ void consume_repeatly(tmq_t* tmq) { code = tmq_offset_seek(tmq, topic_name, p->vgId, p->begin); if (code != 0) { - fprintf(stderr, "Failed to seek offset, topic: %s, groupId: %s, clientId: %s, ErrCode: 0x%x, ErrMessage: %s.\n", - topic_name, config.group_id, config.client_id, code, tmq_err2str(code)); + fprintf(stderr, "Failed to seek offset, topic: %s, groupId: %s, clientId: %s, vgId: %d, ErrCode: 0x%x, ErrMessage: %s.\n", + topic_name, config.group_id, config.client_id, p->vgId, code, tmq_err2str(code)); break; } } diff --git a/docs/examples/c/with_reqid_demo.c b/docs/examples/c/with_reqid_demo.c index 8942077f67..1a1a53acc6 100644 --- a/docs/examples/c/with_reqid_demo.c +++ b/docs/examples/c/with_reqid_demo.c @@ -57,7 +57,6 @@ static int DemoWithReqId() { fprintf(stdout, "query successfully, got %d fields, the sql is: %s.\n", num_fields, sql); - // fetch the records row by row while ((row = taos_fetch_row(result))) { // Add your data processing logic here