Re: reduce compiler warnings (win32)
| From: | Steph | Date: | Mon, 12 Sep 2005 12:22:33 +0000 |
| Subject: | Re: reduce compiler warnings (win32) | ||
| References: | 1 2 3 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-1634@lists.php.net to get a copy of this message | ||
Sorry Andrei, it's obvious to me and Tom both - I forgot you don't see them
:)
One's where a counter 'i' is declared as guint in gdk.overrides - going on
history, it shouldn't make any difference if that's an int, apart from
killing a compiler warning.
The other's a double-to-long conversion from gtk_label_get_angle() in
gtk.defs. I've no idea why that one alone should cause VC6 to complain
(there are others that are also declared as 'gdouble' in GTK+ and 'gint' in
our defs files and no problem) but it does. _Should_ be okay to change it
back, given that it's a 'get' function....?
Tom's patch to clear up the rest of the compiler warnings definitely looks
nicer than mine, and takes a completely different approach. I still need to
re-run compilation with an un-patched version to figure out which functions
were affected so I can make sure their behaviour isn't changed any, before
committing it.
Is there any chance of your reviewing my other recent patches fairly soon,
please? It's getting to the point where it's going to be fun & games
sorting out the different bits prior to committing... assuming they're okay
to commit at all...
- Steph
----- Original Message -----
From: "Andrei Zmievski" <andrei@gravitonic.com>
To: "Steph" <steph@zend.com>
Cc: "Tom Rogers" <trogers@kwikin.com>; "PHP-GTK dev"
<php-gtk-dev@lists.php.net>
Sent: Sunday, September 11, 2005 4:53 PM
Subject: Re: [PHP-GTK-DEV] reduce compiler warnings (win32)
> Which two?
>
> -Andrei
>
>
> On Sep 11, 2005, at 1:14 AM, Steph wrote:
>
> > S'funny, I was doing that last night too (and went the new-class-
> > for-floats
> > route).
> >
> > We need to test both options - both get rid of compiler warnings.
> > Yours is
> > prettier.
> >
> > The other two are code-related - need to check them with Andrei.
> >
> > - Steph
> >
> > ----- Original Message -----
> > From: "Tom Rogers" <trogers@kwikin.com>
> > To: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
> > Cc: "Andrei" <andrei@gravitonic.com>; "Steph"
> > <steph@zend.com>
> > Sent: Sunday, September 11, 2005 6:01 AM
> > Subject: [PHP-GTK-DEV] reduce compiler warnings (win32)
> >
> >
> >
> >> Hi
> >>
> >> Here is a patch to get rid of compiler warnings:
> >>
> >> conversion from 'double ' to 'float ', possible loss of data
> >>
> >> RCS file: /repository/php-gtk/generator/arg_types.php,v
> >> retrieving revision 1.73
> >> diff -u -w -b -r1.73 arg_types.php
> >> --- arg_types.php 3 Sep 2005 19:06:12 -0000 1.73
> >> +++ arg_types.php 11 Sep 2005 04:55:00 -0000
> >> @@ -300,8 +300,11 @@
> >> $info->var_list->add('double', $name . ' = ' .
> >> $default);
> >> else
> >> $info->var_list->add('double', $name);
> >> - $info->arg_list[] = $name;
> >> $info->add_parse_list('d', '&' . $name);
> >> + if($type == 'gfloat')
> >> + $info->arg_list[] = "(float)$name";
> >> + else
> >> + $info->arg_list[] = $name;
> >> }
> >>
> >> function write_return($type, $owns_return, $info)
> >>
> >>
> >> Or should there be a whole new class for floats ?
> >>
> >> --
> >>
> >> Tom
> >>
> >> --
> >> PHP-GTK Development Mailing List (http://gtk.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> > --
> > PHP-GTK Development Mailing List (http://gtk.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>