From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKEv8-0004Q8-01 for qemu-devel@nongnu.org; Fri, 05 Oct 2012 16:54:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKEv6-00020g-N9 for qemu-devel@nongnu.org; Fri, 05 Oct 2012 16:54:53 -0400 Message-ID: <506F4900.8080404@redhat.com> Date: Fri, 05 Oct 2012 14:54:24 -0600 From: Eric Blake MIME-Version: 1.0 References: <1349468535-14499-1-git-send-email-ehabkost@redhat.com> <20121005204024.GF4362@otherpad.lan.raisama.net> In-Reply-To: <20121005204024.GF4362@otherpad.lan.raisama.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig2D4E4C062482115DB94FD4D0" Subject: Re: [Qemu-devel] [QEMU PATCH] create struct for machine initialization arguments (v2) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Peter Maydell , Anthony Liguori , xen-devel@lists.xensource.com, Igor Mitsyanko , Evgeny Voevodin , qemu-devel@nongnu.org, Fabien Chouteau , Alexander Graf , Peter Crosthwaite , Max Filippov , Michael Walle , qemu-ppc@nongnu.org, Paul Brook , Blue Swirl , "Edgar E. Iglesias" , Guan Xuetao , =?ISO-8859-1?Q?Herv=E9_Poussineau?= , Maksim Kozlov , Jan Kiszka , Aurelien Jarno , Dmitry Solodkiy This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2D4E4C062482115DB94FD4D0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 =3D { .ram_size =3D ram_size, >>> + .boot_device =3D boot_devices, >>> + .kernel_filename =3D kernel_filenam= e, >>> + .kernel_cmdline =3D kernel_cmdline,= >>> + initrd_filename =3D initrd_filename= , >> >> Missing dot? >=20 > 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. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig2D4E4C062482115DB94FD4D0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQb0kCAAoJEKeha0olJ0NqTaQH/iAFRHdvwJYOaXv8ksZrxT22 mimB0inM+fbtYYsjYynjcK+DOs9Jew4L8ZjQDXOT+b79qXJCvu56uzKKnz9O5yw6 dDZX58KHUwLHGrnW1yFG2/k1kRfO+PyQyS0KTFxVpNZMFbX1HPjuQ779waX6Tb8D 1XijiIPsH2JcKk2dvN/3hYR+5AhR6KX82Fs4fB2Y/CxRYah9u1PrIduqMiDLmpV8 JAsuIhpDcgPCk3QewvOxWp4V5OHIYgo/1FdkMgZWXJCjxA2kNrHpcOtdSmKBg7GE BovTo3gjCNHbq0it6hN5PbuoQB2RIXA3jMtWbnhpfA8YV9jMSXV6aPxCU40nZ0c= =40e2 -----END PGP SIGNATURE----- --------------enig2D4E4C062482115DB94FD4D0--