Skip to content

Fix -Wdiscarded-qualifiers warning#115

Merged
icculus merged 1 commit intoicculus:mainfrom
madebr:strchr-qualifiers-fix
May 2, 2026
Merged

Fix -Wdiscarded-qualifiers warning#115
icculus merged 1 commit intoicculus:mainfrom
madebr:strchr-qualifiers-fix

Conversation

@madebr
Copy link
Copy Markdown
Collaborator

@madebr madebr commented May 2, 2026

src/physfs.c:1119:9: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1119 | ptr = strrchr(argv0, dirsep);
| ^

  • I confirm that I am the author of this code and release it to the PhysicsFS project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

src/physfs.c:1119:9: warning: assignment discards ‘const’ qualifier
from pointer target type [-Wdiscarded-qualifiers]
 1119 |     ptr = strrchr(argv0, dirsep);
      |         ^
@sezero
Copy link
Copy Markdown
Collaborator

sezero commented May 2, 2026

C23-glibc, right?

@icculus icculus merged commit ce5af38 into icculus:main May 2, 2026
5 checks passed
@madebr
Copy link
Copy Markdown
Collaborator Author

madebr commented May 2, 2026

C23-glibc, right?

Yeah, it's using _Generic.

@madebr madebr deleted the strchr-qualifiers-fix branch May 2, 2026 04:01
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.

3 participants