Date: Sat, 6 Apr 2019 08:29:02 +0000
From: "Robert Elz" <[email protected]>
Message-ID: <[email protected]>
| Module Name: src
| Committed By: kre
| Date: Sat Apr 6 08:29:02 UTC 2019
|
| Modified Files:
| src/external/bsd/pkg_install/dist/create: util.c
|
| Log Message:
| Use __UNCONST() rather than a simple cast to free a const char *
| while avoiding gcc noise.
Note that a better fix for this would probably be to remove the
const from the fields in the struct definition (in create.h)
As far as I can see, nothing needs (even conceptually) that they
be there - the data is always assigned as
ptr->owner = xstrdup(whatever);
where xstrdup() is just strdup() + error check, and strdup() is
the canonical way to correctly (if slowly) convert a const char *
into a char * ... making it be const char * again just seems wrong.
However, I will leave it for someone else to determine if that
really is a preferred solution.
kre