[Spice-devel] [spice-gtk v1] spicy: use gboolean for GtkSettings properties

Victor Toso victortoso at redhat.com
Mon Mar 6 10:26:15 UTC 2017


Hi,

On Mon, Mar 06, 2017 at 11:15:58AM +0100, Pavel Grunt wrote:
> ACK
>
> Thanks,
> Pavel
> 
> I think some of these setting properties are deprecated

Oh, true. The second one here is deprecated and ignored from gtk v3.10
onwards. I'll send a followup patch.

>
> On Mon, 2017-03-06 at 11:09 +0100, Victor Toso wrote:
> > From: Victor Toso <me at victortoso.com>
> > 
> > As gboolean is 4 bytes long while bool is 1 byte, valgrind will
> > complain
> > about it.
> > 
> > Invalid write of size 4
> >    at 0xAE9F4FB: value_lcopy_boolean (gvaluetypes.c:78)
> >    by 0xAE7CFD3: g_object_get_valist (gobject.c:2236)
> >    by 0xAE7D40B: g_object_get (gobject.c:2324)
> >    by 0x40758F: keyboard_grab_cb (spicy.c:566)
> >    by 0xAE753E4: g_closure_invoke (gclosure.c:804)
> >    by 0xAE87431: signal_emit_unlocked_R (gsignal.c:3635)
> >    by 0xAE9005E: g_signal_emit_valist (gsignal.c:3391)
> >    by 0xAE9043E: g_signal_emit (gsignal.c:3447)
> >    by 0x4E4A6FB: try_keyboard_grab (spice-widget.c:889)
> >    by 0x4E4CAB1: focus_in_event (spice-widget.c:1834)
> >    by 0x9325E70: _gtk_marshal_BOOLEAN__BOXEDv (gtkmarshalers.c:131)
> >    by 0xAE75561: _g_closure_invoke_va (gclosure.c:867)
> > 
> > Signed-off-by: Victor Toso <victortoso at redhat.com>
> > ---
> >  tools/spicy.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tools/spicy.c b/tools/spicy.c
> > index cd1677f..2772cfa 100644
> > --- a/tools/spicy.c
> > +++ b/tools/spicy.c
> > @@ -75,8 +75,8 @@ struct _SpiceWindow {
> >      gint             win_x;
> >      gint             win_y;
> >  #endif
> > -    bool             enable_accels_save;
> > -    bool             enable_mnemonics_save;
> > +    gboolean         enable_accels_save;
> > +    gboolean         enable_mnemonics_save;
> >  };
> >  
> >  struct _SpiceWindowClass
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170306/41f38fa3/attachment.sig>


More information about the Spice-devel mailing list