[Vala] unused variable warning in generated C code
- From: Nicolas CARRIER <nicolas carrier parrot com>
- To: <vala-list gnome org>
- Subject: [Vala] unused variable warning in generated C code
- Date: Fri, 12 Dec 2014 10:46:17 +0100
Hello,
When I compile the following code :
public static int main(string[] args) {
int[] b = { 2, 4, 6, 8 };
foreach (int a in b)
stdout.printf("%d\n", a);
return 0;
}
with :
$ valac -C main.vala
$ gcc -Wunused-variable main.c -o main $(pkg-config --cflags --libs glib-2.0)
I get the following warning :
main.c: In function ‘_vala_main’:
main.c:38:8: attention : unused variable ‘_a_collection_size_’ [-Wunused-variable]
gint _a_collection_size_ = 0;
^
What is the reason for this warning ?
Is it possible to get rid of it ?
PS: valac --version gives Vala 0.26.1.
Thank you
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]