Skip to content

fix(host): Fix const qualifier violations for CI builds (EHM-164)#150

Open
sudeep-mohanty wants to merge 1 commit intoespressif:mainfrom
sudeep-mohanty:fix/const-qualifier-violations
Open

fix(host): Fix const qualifier violations for CI builds (EHM-164)#150
sudeep-mohanty wants to merge 1 commit intoespressif:mainfrom
sudeep-mohanty:fix/const-qualifier-violations

Conversation

@sudeep-mohanty
Copy link
Copy Markdown
Contributor

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_hosted managed component causing build failures.

Related

Testing

  • Tested ESP-IDF build locally

ESP-IDF MR 45069 enables -Wwrite-strings and -Werror=discarded-qualifiers
in CI builds. Fixes const qualifier violations causing build failures.
Copilot AI review requested due to automatic review settings January 21, 2026 12:57
@sudeep-mohanty
Copy link
Copy Markdown
Contributor Author

@mantriyogesh PTAL. Thank you.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 21, 2026
@github-actions github-actions Bot changed the title fix(host): Fix const qualifier violations for CI builds fix(host): Fix const qualifier violations for CI builds (EHM-164) Jan 21, 2026
@mantriyogesh
Copy link
Copy Markdown
Collaborator

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?

@sudeep-mohanty
Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Opened Issue is new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants