Skip to contentSkip to conversation

Compile issues for xen 4.1.0rc with gcc 4.6 on rawhide

DISCUSSION M A Young 1 participant 1 message Feb 3, 2011

lore
Share & tools
lore

M A Young

author
#0 lore raw

If I try to build xen-4.1.0-rc on Fedora rawhide it fails. The problem is that the compiler now sets -Werror=unused-but-set-variable and -Werror=uninitialized by default (I don't know if this is a rawhide feature or one from gcc 4.6). I can of course work around this by changing the compile options but I am wondering if this is something that should be fixed properly.

I have looked a bit at the set but unused variables reported though there are a lot of them, and in some cases it is reasonable, for example the variable is used in an ASSERT test that is removed by the pre-processor, but in other cases the variable is set for no apparent reason and perhaps it should being used but isn't. You can tell the compiler not to warn you about a variable by adding __attribute__ ((unused)) after its definition (in gcc at least), or in many cases you can just remove the variable.

Michael Young