Most proper way to convert string literal to char*

I'm modifying parts of a larger codebase to remove some compiler warnings (in this case, -Wwrite-strings). A structure containing a char* is initialized with a string literal (const char*) and the compiler throws this warning. I searched a bit and found a few different solutions, however, I'd rather ask here first. I'm not going to change the structure itself, so I need to find the best way to cast in place.

From what I've read, the answer is probably const_cast<char*>(mystringliteral). The C way would be simply (char*).

This project is a derivative of another one which is 25,000 lines of code. We absorb the upstream changes after they've been reviewed. Asking the other maintainers if they'd rather adapt to the upstream mistakes (casting), or correct them (change the struct definitions).

Edit: Off-topic, once you find an open-source project that actually needs help and is friendly to people who have the time, it's kind of fun.