[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [RESEND RFC 5/6] hw/arm/sysbus-fdt: helpers
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [RESEND RFC 5/6] hw/arm/sysbus-fdt: helpers for clock node generation |
Date: |
Thu, 17 Dec 2015 13:44:49 +0000 |
On 17 December 2015 at 13:28, Alex Bennée <address@hidden> wrote:
> Usually I would expect to see a pre-declaration of a function at the
> head of the file and only if it is used before the actual definition of
> the function. It doesn't make sense to pre-declare right before the
> actual function definition itself.
>
> I'm surprised to hear the compiler complained, especially as nothing was
> calling this function in this patch.
The compiler complains if it sees a function which is not static
and for which it hasn't previously seen a prototype, because
generally this means that either (a) the function is file-local
only and should have been declared static or (b) the function is
not file-local but you forgot to put a prototype in a header so
that other files can call it. (This is -Wmissing-prototypes.)
thanks
-- PMM