From 1dfbd492b97496ca0b7168e41a9f2bcf682d9644 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 21 Apr 2016 23:36:12 +0200 Subject: [PATCH] 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. --- Examples/test-suite/special_variables.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples/test-suite/special_variables.i b/Examples/test-suite/special_variables.i index 035df1e24..a95e288d8 100644 --- a/Examples/test-suite/special_variables.i +++ b/Examples/test-suite/special_variables.i @@ -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*)$name(3.0,4.0).c_str(); // Should expand to Space::exceptionvars // 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 @@ -67,7 +67,7 @@ std::string exceptionvars(double i, double j) { result = (char*)$name().c_str(); result = (char*)$name(2.0).c_str(); // 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 %}