Tiny warning patch

John (J5) Palmieri johnp at redhat.com
Thu Oct 27 09:27:41 PDT 2005


Just a style pref but can we say?:

GParamSpec *spec;
.
.
.
spec = NULL;

On Thu, 2005-10-27 at 12:39 +0100, Ross Burton wrote:
> Hi,
> 
> Tiny patch to stop gcc moaning that a variable can be used without being
> set (it can't but there you go):
> 
> Index: glib/dbus-gobject.c
> ===================================================================
> RCS file: /cvs/dbus/dbus/glib/dbus-gobject.c,v
> retrieving revision 1.49
> diff -u -r1.49 dbus-gobject.c
> --- glib/dbus-gobject.c 25 Oct 2005 15:57:13 -0000      1.49
> +++ glib/dbus-gobject.c 27 Oct 2005 11:37:45 -0000
> @@ -440,7 +440,7 @@
>    for (; properties; properties = properties->next)
>      {
>        const char *propname;
> -      GParamSpec *spec;
> +      GParamSpec *spec = NULL;
>        char *dbus_type;
>        gboolean can_set;
>        gboolean can_get;
> 
> Ross
-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list