From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4XN9-0004E0-I1 for qemu-devel@nongnu.org; Mon, 05 Mar 2012 07:50:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4XN0-0001tj-II for qemu-devel@nongnu.org; Mon, 05 Mar 2012 07:50:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4XN0-0001t1-AU for qemu-devel@nongnu.org; Mon, 05 Mar 2012 07:50:30 -0500 Date: Mon, 5 Mar 2012 14:50:23 +0200 From: Alon Levy Message-ID: <20120305125023.GA22994@garlic.tlv.redhat.com> References: <1330703384-17447-1-git-send-email-hdegoede@redhat.com> <4F517769.4020603@comstyle.com> <20120305124713.GH18249@garlic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120305124713.GH18249@garlic> Subject: Re: [Qemu-devel] [PATCH] libcacard: Fix compilation with gcc-4.7 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brad Smith , Hans de Goede , qemu-devel@nongnu.org, Gerd Hoffmann On Mon, Mar 05, 2012 at 02:47:13PM +0200, Alon Levy wrote: > On Fri, Mar 02, 2012 at 08:44:09PM -0500, Brad Smith wrote: > > On 02/03/12 10:49 AM, Hans de Goede wrote: > > >VCARD_ATR_PREFIX is used as part of an array initializer so it should > > >not have () around it, so far this happened to work, but gcc-4.7 does > > >not like it. > > > > Thanks for the report, my bad, used a different version of vcardt.h for > compilation probably. This breaks on linux as well with gcc 4.7.0 . Please ignore the previous email. > > > This recent commit.. > > > > libcacard: fix reported ATR length > > > > Broke the build on my OpenBSD (gcc 4.2.1) buildbot which was due to the > > change to this macro. > > > > vcard_emul_nss.c:528: warning: left-hand operand of comma expression > > has no effect > > vcard_emul_nss.c:528: warning: left-hand operand of comma expression > > has no effect > > vcard_emul_nss.c:528: warning: left-hand operand of comma expression > > has no effect > > vcard_emul_nss.c:528: warning: left-hand operand of comma expression > > has no effect > > vcard_emul_nss.c:528: warning: left-hand operand of comma expression > > has no effect > > vcard_emul_nss.c:528: warning: left-hand operand of comma expression > > has no effect > > vcard_emul_nss.c:528: warning: left-hand operand of comma expression > > has no effect > > vcard_emul_nss.c:528: warning: left-hand operand of comma expression > > has no effect > > vcard_emul_nss.c:528: warning: left-hand operand of comma expression > > has no effect > > vcard_emul_nss.c:528: error: initializer element is not constant > > vcard_emul_nss.c:528: error: (near initialization for 'nss_atr[0]') > > gmake[1]: *** [vcard_emul_nss.o] Error 1 > > > > >Signed-off-by: Hans de Goede > > >--- > > > libcacard/vcardt.h | 4 ++-- > > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > > >diff --git a/libcacard/vcardt.h b/libcacard/vcardt.h > > >index d4d8e2e..d3e9522 100644 > > >--- a/libcacard/vcardt.h > > >+++ b/libcacard/vcardt.h > > >@@ -26,8 +26,8 @@ typedef struct VCardEmulStruct VCardEmul; > > > #define MAX_CHANNEL 4 > > > > > > /* create an ATR with appropriate historical bytes */ > > >-#define VCARD_ATR_PREFIX(size) (0x3b, 0x68+(size), 0x00, 0xff, \ > > >- 'V', 'C', 'A', 'R', 'D', '_') > > >+#define VCARD_ATR_PREFIX(size) 0x3b, 0x68+(size), 0x00, 0xff, \ > > >+ 'V', 'C', 'A', 'R', 'D', '_' > > > > > > > > > typedef enum { > > > > -- > > This message has been scanned for viruses and > > dangerous content by MailScanner, and is > > believed to be clean. > > > > >