get rid of all compile warnings

This commit is contained in:
strawmanbobi
2022-01-30 11:24:38 +08:00
parent 6732258bda
commit c98574dbe5
8 changed files with 17 additions and 17 deletions

View File

@@ -187,7 +187,7 @@ void AliyunIoTSDK::loop() {
void AliyunIoTSDK::sendEvent(const char *eventId, const char *param) {
char topicKey[156];
sprintf(topicKey, "%s/%s/post", 0, eventId);
snprintf(topicKey, sizeof(topicKey) - 1, "%d/%s/post", 0, eventId);
char jsonBuf[1024];
sprintf(jsonBuf, ALINK_EVENT_BODY_FORMAT, param, eventId);
Serial.println(jsonBuf);