Removed redundant casts to `char *`.
Corresponding functions now accept `const char *` (issue #1772673).