Received: from eggs.gnu.org ([2001:4830:134:3::10]:57277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmijQ-0002Sr-Jb for qemu-devel@nongnu.org; Wed, 21 Sep 2016 10:42:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmijM-0003lR-Ds for qemu-devel@nongnu.org; Wed, 21 Sep 2016 10:42:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmijM-0003l8-4r for qemu-devel@nongnu.org; Wed, 21 Sep 2016 10:42:36 -0400 References: <1474391326-871-1-git-send-email-felipe@nutanix.com> <000301d213c7$7142f980$53c8ec80$@ru> <87y42l93dr.fsf@dusky.pond.sub.org> <20160921100718.GO15535@redhat.com> <87mvj11ljr.fsf@dusky.pond.sub.org> <7500849B-8BCC-4743-92A6-5DBD4D8575E8@nutanix.com> From: Eric Blake Message-ID: <75822602-30f6-dedc-217f-10e1046cba25@redhat.com> Date: Wed, 21 Sep 2016 09:42:34 -0500 MIME-Version: 1.0 In-Reply-To: <7500849B-8BCC-4743-92A6-5DBD4D8575E8@nutanix.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vH8dXi4MHKCljgp5bjGJnNpvFXDeigbKM" Subject: Re: [Qemu-devel] [PATCH] replay: Fix build with -Werror=unused-result List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Felipe Franciosi Cc: Markus Armbruster , "Daniel P. Berrange" , Pavel Dovgalyuk , qemu-devel , Pavel Dovgalyuk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vH8dXi4MHKCljgp5bjGJnNpvFXDeigbKM From: Eric Blake To: Felipe Franciosi Cc: Markus Armbruster , "Daniel P. Berrange" , Pavel Dovgalyuk , qemu-devel , Pavel Dovgalyuk Message-ID: <75822602-30f6-dedc-217f-10e1046cba25@redhat.com> Subject: Re: [Qemu-devel] [PATCH] replay: Fix build with -Werror=unused-result References: <1474391326-871-1-git-send-email-felipe@nutanix.com> <000301d213c7$7142f980$53c8ec80$@ru> <87y42l93dr.fsf@dusky.pond.sub.org> <20160921100718.GO15535@redhat.com> <87mvj11ljr.fsf@dusky.pond.sub.org> <7500849B-8BCC-4743-92A6-5DBD4D8575E8@nutanix.com> In-Reply-To: <7500849B-8BCC-4743-92A6-5DBD4D8575E8@nutanix.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/21/2016 09:26 AM, Felipe Franciosi wrote: >=20 > What's the best way to bring gnulib's ignore-value.h into Qemu? I'd thi= nk we could just add to include/qemu/compiler.h something like: >=20 > ----------------------8<---------------------- > #if QEMU_GNUC_PREREQ(3, 4) > /* From gnulib's ignore-value.h by Jim Meyering, Eric Blake and Padraig= Brady */ > # define ignore_value(x) \ > (__extension__ ({ __typeof__ (x) __x =3D (x); (void) __x; })) > #else > # define ignore_value(x) ((void) (x)) > #endif > ----------------------8<---------------------- >=20 > But I'm not sure if that suffices to meet GPL's requirements. As Dan already pointed out, gnulib's ignore_value() is available under LGPLv2+ (the full gnulib.git/lib/ignore-value.h file states GPLv3+, for ease of copying into other GPLv3 projects; but the modules/ignore-value file states what additional licenses it can be used under). Using 'gnulib-tool --lgpl=3D2 ignore-value' would give you the modified version= ; but it is probably overkill for this situation (we can skip straight to the end result instead of going through intermediate steps). Furthermore, I'm the original author of that code snippet as listed (as gnulib.git will show); where the only modification made after I wrote it was whitespace changes and the addition of __extension__, and I'm just fine with those lines being used as-is in qemu.git (there's benefits when an original author states intentions :) So copying and pasting the relevant snippet into compiler.h is indeed the way to go; in fact, you can probably get away with a comment that just says "/* From gnulib's LGPLv2+ ignore-value.h */" without having to call out particular authors. Don't bother creating any new header or worrying about copyright boilerplate changes; and you can point to this message-id in the commit message if you are worried about a paper trail; you are not violating the GPL in this instance. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --vH8dXi4MHKCljgp5bjGJnNpvFXDeigbKM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX4pxaAAoJEKeha0olJ0NqMGMH/37pfL742oMllP/y4M+athgd NckwQLblo9uyKWzzWzytKp7nwZk092kY9LbgzpMusgEQZmaQpcI/NgkgfreC/tOC gpGniMkbGwYT1lmFYaEyobffsxYowADQU1u0nUsSa4jqA4atEuV8vfhzM9fvO9fp 6yN4BRNe7XCbTZsJczv45090XQ6YDmV8pAVYBr9u6K6dJxtSmaVjfNzz0E6SPOpG ewDWx3MR7ZU1Me9mVHtkiTYPxKvNwpT+mFCMBJEkB8VGD4WhOvj21xRyWkeAYmm1 0HvPG7SPl6p1DsVuz9QLjmpSusnlNQtL411j9X2BFWq5M0tC2iwewexVz+QpnhI= =APvK -----END PGP SIGNATURE----- --vH8dXi4MHKCljgp5bjGJnNpvFXDeigbKM--