[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Qemu-devel] [QEMU PATCH] create struct for machine initialization arguments (v2)
On 10/05/2012 02:40 PM, Eduardo Habkost wrote: >>> - machine->init(ram_size, boot_devices, >>> - kernel_filename, kernel_cmdline, initrd_filename, >>> cpu_model); >>> + QEMUMachineInitArgs args = { .ram_size = ram_size, >>> + .boot_device = boot_devices, >>> + .kernel_filename = kernel_filename, >>> + .kernel_cmdline = kernel_cmdline, >>> + initrd_filename = initrd_filename, >> >> Missing dot? > > Funny, GCC didn't complain. Thanks for spotting it! Eww, insidious :P. This assigned local variable initrd_filename to itself, then put the lvalue result of that assignment as the initializer to the next available struct member residing after .kernel_cmdline (which happened to be .initrd_filename). That is, gcc didn't complain because it worked by sheer dumb luck. -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |