I get a strange c compilation warning when using a string as parameter
in a static function. When i forward the string to another string
everything is OK.
(In my program I get this warning from a Gst.TagForeachFunc.)
I am using vala 0.5.2 but I also had this warning in previous versions.
Here are two testcases. The first is giving the warning, the second not.
FIRST:
------------------------------------------
public static void function_1(int i, string a_string) {
switch (a_string) {
case "lalala_1":
print("lalala_1\n");
break;
default:
print("default case\n");
break;
}
}
public static int main (string[] args) {
function_1(1, "lalala_1");
return 0;
}
------------------------------------------
SECOND:
------------------------------------------
public static void function_1(int i, string a_string) {
string x = a_string;
switch (x) {
case "lalala_1":
print("lalala_1\n");
break;
default:
print("default case\n");
break;
}
}
public static int main (string[] args) {
function_1(1, "lalala_1");
return 0;
}
------------------------------------------
Is this a bug or am I getting something wrong?
Regards
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list