All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: Brad Smith <brad@comstyle.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] libcacard: Fix compilation with gcc-4.7
Date: Mon, 5 Mar 2012 14:47:13 +0200	[thread overview]
Message-ID: <20120305124713.GH18249@garlic> (raw)
In-Reply-To: <4F517769.4020603@comstyle.com>

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 .

> 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<hdegoede@redhat.com>
> >---
> >  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.
> 
> 

  reply	other threads:[~2012-03-05 12:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02 15:49 [Qemu-devel] [PATCH] libcacard: Fix compilation with gcc-4.7 Hans de Goede
2012-03-03  1:44 ` Brad Smith
2012-03-05 12:47   ` Alon Levy [this message]
2012-03-05 12:50     ` Alon Levy
2012-03-05 13:06 ` Michal Privoznik
2012-03-06 13:31 ` Alon Levy
2012-03-09 19:27 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120305124713.GH18249@garlic \
    --to=alevy@redhat.com \
    --cc=brad@comstyle.com \
    --cc=hdegoede@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.