Skip to content

ESIF/IPF: fix const discards in string lookup results#61

Open
10ne1 wants to merge 1 commit into
intel:masterfrom
10ne1:fix-strrchr-const-qualifier
Open

ESIF/IPF: fix const discards in string lookup results#61
10ne1 wants to merge 1 commit into
intel:masterfrom
10ne1:fix-strrchr-const-qualifier

Conversation

@10ne1
Copy link
Copy Markdown

@10ne1 10ne1 commented May 15, 2026

esif_ccb_strrchr() and esif_ccb_strpbrk() call strrchr()/strpbrk() which return 'const char *' when given a 'const char *' source, when built against glibc 2.43 with newer GCC and Clang.

Declare result pointers const to match the new expectation and avoid -Werror,-Wincompatible-pointer-types-discards-qualifiers failures.

Tested on latest ChromiumOS main branch.

esif_ccb_strrchr() and esif_ccb_strpbrk() call strrchr()/strpbrk()
which return 'const char *' when given a 'const char *' source, when
built against glibc 2.43 with newer GCC and Clang.

Declare result pointers const to match the new expectation and avoid
-Werror,-Wincompatible-pointer-types-discards-qualifiers failures.

Tested on latest ChromiumOS main branch.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant