Re: [Vala] Cleaning up GCC warnings; dereferencing a void pointer.
- From: Jürg Billeter <j bitron ch>
- To: "Michael B. Trausch" <mbt zest trausch us>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Cleaning up GCC warnings; dereferencing a void pointer.
- Date: Tue, 22 Sep 2009 23:52:34 +0200
On Sun, 2009-09-20 at 21:29 -0400, Michael B. Trausch wrote:
Some time back I had some trouble getting the GDK and X11 bindings
playing well together. Jürg helped out and I got the code to compile
and work properly, but being the pedant that I am, I'd like to get rid
of the warning from gcc altogether.
The code that Vala generates is:
real_xev = (XEvent*) (&(*xev));
The code that silences the GCC warning is:
real_xev = (XEvent *)xev;
So, what I am wondering is, should I report a bug against Vala? It
would seem that the expression "(&(*xev))" could be simplified to the
latter, and that simplification makes GCC happy, since the void* pointer
is no longer dereferenced and the pointer is properly cast to the
appropriate pointer type.
I haven't tested with your exact code, however, I've committed the
expression simplification to Vala master. Let me know if you still have
issues with that.
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]