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

Re: [Xen-devel] [PATCH ARM v3 2/7] mini-os: fixed shutdown thread



On 12 June 2014 10:54, Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> wrote:
> Ian Campbell, le Thu 12 Jun 2014 10:52:29 +0100, a Ãcrit :
>> On Wed, 2014-06-11 at 11:30 +0100, Thomas Leonard wrote:
>> > diff --git a/extras/mini-os/kernel.c b/extras/mini-os/kernel.c
>> > index ea409f4..27e3c56 100644
>> > --- a/extras/mini-os/kernel.c
>> > +++ b/extras/mini-os/kernel.c
>> > @@ -69,6 +69,8 @@ void setup_xen_features(void)
>> >  __attribute__((weak)) void app_shutdown(unsigned reason)
>> >  {
>> >      printk("Shutdown requested: %d\n", reason);
>> > +    struct sched_shutdown sched_shutdown = { .reason = reason };
>> > +    HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown);
>>
>> I was going to apply but this causes:
>>         kernel.c: In function âapp_shutdownâ:
>>         kernel.c:72:5: error: ISO C90 forbids mixed declarations and code 
>> [-Werror=declaration-after-statement]
>>         cc1: all warnings being treated as errors
>
> Ah, odd that they didn't get it. Just exchanging the printk and
> sched_shutdown declaration will do it :)

Well, I can change this. But note that Mini-OS won't compile with
-Werror=declaration-after-statement even before these changes. e.g.

lib/xmalloc.c: In function â_xmallocâ:
lib/xmalloc.c:166:9: error: ISO C90 forbids mixed declarations and
code [-Werror=declaration-after-statement]
         uintptr_t size_before = (data_begin - hdr_size) - (uintptr_t)i;
         ^
lib/xmalloc.c:193:5: error: ISO C90 forbids mixed declarations and
code [-Werror=declaration-after-statement]
     struct xmalloc_pad *pad = (struct xmalloc_pad *) data_begin - 1;
     ^
cc1: all warnings being treated as errors


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

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

 


Rackspace

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