On Sat, 12 Sep 2020 17:05:02 +0200, Christian Weisgerber wrote: > A make build with the patch below succeeds, but gains some new > warnings "passing 'const char *' to parameter of type 'char *' > discards qualifiers". > > This is a portability trap. Code written on OpenBSD may not be > prepared for basename() or dirname() to splat a '\0' into the input > string, despite the warning in the man page. > > I'm in favor of moving to the POSIX prototypes, but I don't know > if there are any hidden pitfalls I may be missing. Opinions, > comments?
This is probably the right thing to do but we should fix the warnings it generates. In this new world order, passing a const char * to basename() or dirname() is unsafe. - todd
