[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Compilation Error in extras/mini-os/tpmback.c
Ian Campbell, le Wed 16 Jul 2014 10:13:31 +0100, a Ãcrit : > On Wed, 2014-07-16 at 11:25 +0530, Dushyant Behl wrote: > > 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. Indeed, C99 apparently says âThe choice of type is implementation-definedâ, so > Probably the value needs to be read into an actual int variable and then > assigned to the enum. that seems like the proper solution. Samuel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |