Skip to content

examples: server: Fix const qualifier discard#2064

Merged
mrdeep1 merged 1 commit into
obgm:developfrom
dimich-dmb:fix_examples_const_qualifier
Jun 22, 2026
Merged

examples: server: Fix const qualifier discard#2064
mrdeep1 merged 1 commit into
obgm:developfrom
dimich-dmb:fix_examples_const_qualifier

Conversation

@dimich-dmb

Copy link
Copy Markdown
Contributor

Compiling with gcc-16.1.1 and glibc-2.43 yields warnings: "initialization discards ‘const’ qualifier from pointer target type".

Indeed, pointer passed to strchr() is const char * and memory pointed by return value of strchr() is never modified, so variable to assign return value should be const char *.

Compiling with gcc-16.1.1 and glibc-2.43 yields warnings: "initialization
discards ‘const’ qualifier from pointer target type".

Indeed, pointer passed to strchr() is `const char *` and memory pointed by
return value of strchr() is never modified, so variable to assign return
value should be `const char *`.
@mrdeep1

mrdeep1 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

LGTM

@mrdeep1 mrdeep1 merged commit 77b4714 into obgm:develop Jun 22, 2026
44 checks passed
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.

2 participants