Add more warning-suppressing casts to special_variables test

Avoid harmless but annoying warning about assigning a literal string to
a non-const char pointer.
This commit is contained in:
Vadim Zeitlin 2016-04-21 23:36:12 +02:00
commit 1dfbd492b9

View file

@ -35,7 +35,7 @@ std::string ExceptionVars(double i, double j) {
result = (char*)$symname(1.0,2.0).c_str(); // Should expand to ExceptionVars result = (char*)$symname(1.0,2.0).c_str(); // Should expand to ExceptionVars
result = (char*)$name(3.0,4.0).c_str(); // Should expand to Space::exceptionvars result = (char*)$name(3.0,4.0).c_str(); // Should expand to Space::exceptionvars
// above will not compile if the variables are not expanded properly // above will not compile if the variables are not expanded properly
result = "$action $name $symname $overname $wrapname"; result = (char*)"$action $name $symname $overname $wrapname";
%} %}
#else #else
@ -67,7 +67,7 @@ std::string exceptionvars(double i, double j) {
result = (char*)$name().c_str(); result = (char*)$name().c_str();
result = (char*)$name(2.0).c_str(); result = (char*)$name(2.0).c_str();
// above will not compile if the variables are not expanded properly // above will not compile if the variables are not expanded properly
result = "$action $name $symname $overname $wrapname"; result = (char*)"$action $name $symname $overname $wrapname";
// $decl // $decl
%} %}