Kaynağa Gözat

refactor: 删除未使用变量

RyanCW 1 yıl önce
ebeveyn
işleme
11b3efdb93
2 değiştirilmiş dosya ile 1 ekleme ve 2 silme
  1. 1 1
      mqttclient/RyanMqttThread.c
  2. 0 1
      mqttclient/RyanMqttUtile.c

+ 1 - 1
mqttclient/RyanMqttThread.c

@@ -472,7 +472,7 @@ static RyanMqttError_e RyanMqttReadPacketHandler(RyanMqttClient_t *client, uint8
         RyanMqttCheck(RyanMqttSuccessError == result, result, rlog_d);
     }
 
-    uint16_t packLen = fixedHeaderLen + payloadLen;
+    // uint16_t packLen = fixedHeaderLen + payloadLen;
 
     // 控制报文类型
     // 发送者QoS2动作 发布PUBLISH报文 -> 等待PUBREC报文 -> 发送PUBREL报文 -> 等待PUBCOMP报文

+ 0 - 1
mqttclient/RyanMqttUtile.c

@@ -305,7 +305,6 @@ RyanMqttBool_e RyanMqttMatchTopic(const char *topic,
  */
 RyanMqttError_e RyanMqttMsgHandlerCreate(RyanMqttClient_t *client, char *topic, uint16_t topicLen, RyanMqttQos_e qos, RyanMqttMsgHandler_t **pMsgHandler)
 {
-    RyanMqttError_e result = RyanMqttSuccessError;
     RyanMqttMsgHandler_t *msgHandler = NULL;
     RyanMqttAssert(NULL != topic);
     RyanMqttAssert(NULL != pMsgHandler);