Since you're getting the error:
warning: deprecated conversion from string constant to 'char*'
I guess you're compiling using C++ compiler as the C++11 deprecating conversion from string constant to 'char*'
.
§ C.1.1
char* p = "abc"; // valid in C, invalid in C++
You cannot get this error if you're compiling with a C compiler as this conversion still valid in C.
Compiling with a C++ compiler can generate many errors if your program is not C++ compatible.
So just make sure to compile using a C compiler.