xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Dushyant Behl <myselfdushyantbehl@gmail.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	xen-devel@lists.xen.org
Subject: Re: Compilation Error in extras/mini-os/tpmback.c
Date: Wed, 16 Jul 2014 10:13:31 +0100	[thread overview]
Message-ID: <1405502011.7019.3.camel@kazak.uk.xensource.com> (raw)
In-Reply-To: <CAHF350JYb8X+CxTFowS3HL4Apm99L4KjK-tXBdD7NzrQ0GFFYA@mail.gmail.com>

On Wed, 2014-07-16 at 11:25 +0530, Dushyant Behl wrote:
> Hi,
> 
> I'm trying to compile xen from the source and i'm getting this
> compilation error while running a make world.
> 
> tpmback.c: In function ‘tpmif_change_state’:
> tpmback.c:350:4: error: format ‘%d’ expects argument of type ‘int *’,
> but argument 3 has type ‘enum xenbus_state *’ [-Werror=format=]
>     if(sscanf(value, "%d", &readst) != 1) {
>     ^
> cc1: all warnings being treated as errors
> make[3]: *** [/home/corvo/gsoc/code/xen/stubdom/mini-os-x86_64-vtpm/tpmback.o]
> Error 1
> 
> Could anyone explain that if this is just problem on my side or this
> is not fixed in the git tree.

It looks like a legitimate issue to me. I expect you are just the first
person to use a compiler which picks up in this particular issue.

I'm not sure what the correct fix is since C doesn't mandate very much
about the storage size of an enum, so casting is probably not the right
answer.

Probably the value needs to be read into an actual int variable and then
assigned to the enum. Perhaps Ian J (Ccd) knows what the right thing to
do is.

Also CCing the mini-os and tpmback maintainers...

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-07-16  9:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16  5:55 Compilation Error in extras/mini-os/tpmback.c Dushyant Behl
2014-07-16  9:13 ` Ian Campbell [this message]
2014-07-17 18:21   ` Samuel Thibault
2014-07-18  9:55     ` Ian Campbell
2014-07-18 10:01       ` Dushyant Behl
2014-07-18 10:09         ` Ian Campbell

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=1405502011.7019.3.camel@kazak.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=myselfdushyantbehl@gmail.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).