[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Compilation Error in extras/mini-os/tpmback.c

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

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...


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.