Part of the problem is writing into string constants (pointers to constant characters).
/Users/john/Documents/Arduino/sketch_nov24a/sketch_nov24a.ino:8:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
};
^
/Users/john/Documents/Arduino/sketch_nov24a/sketch_nov24a.ino:8:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
/Users/john/Documents/Arduino/sketch_nov24a/sketch_nov24a.ino:8:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
/Users/john/Documents/Arduino/sketch_nov24a/sketch_nov24a.ino:8:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
If you fix those by changing "char *s" to "const char *s". Then the warnings jump to the call to xstrrev() where you are passing "const char *" to a function that takes "char *".
THEN the warnings appear on the calls to "strrev()" where you are passing "const char *" to a function that takes "char *". Since strrev() modifies the characters, you can't change it to say that it doesn't.
Using a 'const char *' as a 'char *' is usually a mistake, which is why you get a warning and why it is invalid code in ISO C++. The way to do it without warnings is to use initialized character arrays. You are free to write whatever you want into your own character arrays:
char s1[] = "To err is hman..";
char s2[] = "man is wild";
char s3[] = "Dream big thought";
char s4[] = "do it myself self";
char *s[] = {s1, s2, s3, s4};