Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

PiotrBzdrega
Copy link

format '%d' expects argument of type 'int', but argument param->write.handle has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]

format '%d' expects argument of type 'int', but argument param->write.handle has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jul 6, 2023
@github-actions github-actions bot changed the title LOG format LOG format (IDFGH-10580) Jul 6, 2023
@@ -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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 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,
  2. 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,

@esp-qing
Copy link
Collaborator

@esp-qing
Copy link
Collaborator

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 ]
If you don't want to proceed, we'll submit it and close this issue soon. Thank you!

@espressif-bot espressif-bot added Status: In Progress Work is in progress Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new Status: In Progress Work is in progress labels Aug 9, 2023
@PiotrBzdrega PiotrBzdrega deleted the patch-1 branch August 18, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants