fix(eppp_link): Fix const qualifier violation in eppp_link (IDFGH-17135)#994
Conversation
Changed void *ctx parameter to const void *ctx to match esp_netif_find_if API signature that requires const void *ctx in the predicate function.
david-cermak
left a comment
There was a problem hiding this comment.
Thanks for the fix!
| #endif | ||
|
|
||
| static bool have_some_eppp_netif(esp_netif_t *netif, void *ctx) | ||
| static bool have_some_eppp_netif(esp_netif_t *netif, const void *ctx) |
There was a problem hiding this comment.
but the predicate is defined as
just void*, not const
There was a problem hiding this comment.
Hello @david-cermak, That is true. The complementary internal GitLab MR !45375 has the required update.
There was a problem hiding this comment.
Then we need some #ifdefs around it, right? Is the GL-MR targeted to v6.1?
There was a problem hiding this comment.
Yes, the GL MR is targeted to v6.1. I now realize that for the eppp_link update we would need some #ifdefs for it work with several IDF versions. Or perhaps, we could handle it in idf_component.yml somehow. I will explore. Setting this MR to draft state for now.
|
@sudeep-mohanty There a few ways to resolve this across multiple IDF versions, none of them is perfect tho
From my perspective the least evil is nr I'm marking this WIP for now |
Description
ESP-IDF MR 45069, 45375 enables -Wwrite-strings and -Werror=discarded-qualifiers in ESP-IDF CI builds. This PR fixes const qualifier violations in examples that use espressif/eppp_link managed component causing build failures.
Related
Note
Updates callback signature for const-correctness.
have_some_eppp_netifsecond parameter fromvoid *ctxtoconst void *ctxto align withesp_netif_find_ifusage and eliminate discarded-qualifiers warnings.Written by Cursor Bugbot for commit 712e0a5. This will update automatically on new commits. Configure here.