fix(host): Fix const qualifier violations for CI builds (EHM-164)#150
fix(host): Fix const qualifier violations for CI builds (EHM-164)#150sudeep-mohanty wants to merge 1 commit intoespressif:mainfrom
Conversation
ESP-IDF MR 45069 enables -Wwrite-strings and -Werror=discarded-qualifiers in CI builds. Fixes const qualifier violations causing build failures.
|
@mantriyogesh PTAL. Thank you. |
There was a problem hiding this comment.
Pull request overview
This PR fixes const qualifier violations in the esp_hosted component to comply with stricter compiler flags (-Wwrite-strings and -Werror=discarded-qualifiers) enabled in ESP-IDF CI builds. The changes add const qualifiers to string pointers that are assigned string literals, preventing implicit discarding of const qualifiers.
Changes:
- Updated component version from 2.10.0 to 2.10.1
- Added const qualifiers to string pointers in serial_if.c (3 locations across 3 functions)
- Added const qualifier to static string pointer in mempool.c
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| idf_component.yml | Version bump to 2.10.1 for patch release |
| host/drivers/virtual_serial_if/serial_if.c | Added const qualifiers to ep_name and ep_name2 pointers in compose_tlv(), parse_tlv(), and transport_pserial_send() functions |
| host/drivers/mempool/mempool.c | Added const qualifier to static MEM_TAG string pointer |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thank you @sudeep-mohanty , I will push your commit tomorrow, as blocked on 2.11.0. Will then need to pus hthis as 2.11.1 Do you have the pre commit hook or something to verify this? |
|
2.11.1 sounds good to me. All apps in IDF already reference esp_hosted version >= 2 in the idf_component.yml. Do let me know if you need me to update this PR with the correct version. |
Description
ESP-IDF MR 45069 enables -Wwrite-strings and -Werror=discarded-qualifiers in CI builds. This PR fixes const qualifier violations in examples that use
espressif/esp_hostedmanaged component causing build failures.Related
Testing