[MDEV-20767] writable-string error on OSX with 10.4.8 Created: 2019-10-07  Updated: 2019-10-09  Resolved: 2019-10-09

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.4.8, 10.3
Fix Version/s: 10.3.19, 10.4.9

Type: Bug Priority: Minor
Reporter: Seth Shelnutt Assignee: Anel Husakovic
Resolution: Fixed Votes: 0
Labels: None
Environment:

MacOS 10.13, Clang 10



 Description   

MDEV-17609 introduced a change to client/mysql.cc which is causing an error with clang on OSX. We discovered this in our CI building 10.4.8 from source.

The error we are seeing on OSX is:

mariadb-10.4.8/client/mysql.cc:2671:21: error: ISO C++11 does not allow conversion from string literal to 'char *' [-Werror,-Wwritable-strings]
  rl_readline_name= "mysql";

It looks like this was fixed in 10.5 with a merge from 10.4. branch but I can't find the actual change included in the 10.4. branch.
https://github.com/MariaDB/server/commit/edef6a007428599fd249815f1dc59a02428090f4

 rl_readline_name= (char *) "mysql";

The cast to `(char *)` is all that is needed to remove this error from OSX builds.

I will push a PR to github shortly with this fix for the 10.4 branch.


Generated at Thu Feb 08 09:02:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.