espressif / esp-mqtt

ESP32 mqtt component
Apache License 2.0
611 stars 257 forks source link

printf nano formatting and using "%zu" in debug log messages (IDFGH-9208) #246

Closed kriegste closed 1 year ago

kriegste commented 1 year ago

In the debug log messages %zu is used almost always. However, when printf nano formatting is enabled, this does not display a number, but just "zu".

Example: ESP_LOGD(TAG, "Get data len= %zu, topic len=%zu, total_data: %d offset: %zu", msg_data_len, msg_topic_len, client->event.total_data_len, msg_data_offset); https://github.com/espressif/esp-mqtt/blob/master/mqtt_client.c#L1047

Result:

MQTT_CLIENT: Get data len= zu, topic len=zu, total_data: 6 offset: zu

IDF 4.4.3

euripedesrocha commented 1 year ago

Hi @kriegste, thanks for reporting. This will be fixed soon.