[Spice-devel] [PATCH 1/2] win-usb-driver-install: initialize "req" with memset

Marc-André Lureau mlureau at redhat.com
Tue Jul 10 09:37:59 PDT 2012



----- Mensaje original -----
> This fixes the following compilation error message:
> 
> ../../gtk/win-usb-driver-install.c: In function
> 'spice_win_usb_driver_send_request':
> ../../gtk/win-usb-driver-install.c:187:5: error: missing braces
> around initializer [-Werror=missing-braces]
> ../../gtk/win-usb-driver-install.c:187:5: error: (near initialization
> for 'req.hdr') [-Werror=missing-braces]

ah yeah, struct in struct initilialization, we usually use a define for these cases in GLib. That also allows changing the initialization later on if the structure changes, or if you want initial value etc (see all the G_*_INIT define)

ack anyway


More information about the Spice-devel mailing list