-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LOG format (IDFGH-10580) #11819
LOG format (IDFGH-10580) #11819
Conversation
format '%d' expects argument of type 'int', but argument param->write.handle has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
|
@@ -189,7 +189,7 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param) | |||
* rather than in this callback directly. Since the printing takes too much time, it may stuck the Bluetooth | |||
* stack and also have a effect on the throughput! | |||
*/ | |||
ESP_LOGI(SPP_TAG, "ESP_SPP_WRITE_EVT len:%d handle:%d cong:%d", param->write.len, param->write.handle, | |||
ESP_LOGI(SPP_TAG, "ESP_SPP_WRITE_EVT len:%d handle:%lu cong:%d", param->write.len, param->write.handle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- For this type, I think it is better to use
PRIu32
instead of direct%lu
.
ESP_LOGI(SPP_TAG, "ESP_SPP_WRITE_EVT len:%d handle:%"PRIu32" cong:%d", param->write.len, param->write.handle,
- Based on this, there is the same problem in another code, and a similar modification.
(examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c)
line 110:ESP_LOGI(SPP_TAG, "ESP_SPP_DATA_IND_EVT len:%d handle:%"PRIu32,
Hi, this is the commit message structure. |
Hi, If you agree with the above proposed modification, could you please modify the code again and submit it according the commit message structure? [ https://github.com/espressif/conventional-precommit-linter/tree/update/default_conventional_commit_rules ] |
format '%d' expects argument of type 'int', but argument param->write.handle has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]