On 07/03/2014 12:41 AM, Nikunj A Dadhania wrote:
> Alexey Kardashevskiy <a...@ozlabs.ru> writes:
>> diff --git a/hw/core/nmi.c b/hw/core/nmi.c
>> new file mode 100644
>> index 0000000..db1295f
>> --- /dev/null
>> +++ b/hw/core/nmi.c
>> @@ -0,0 +1,84 @@
> 
> [...]
> 
>> +
>> +static void nmi_children(Object *o, struct do_nmi_s *ns);
>> +
> 
> [...]
> 
>> +
>> +void nmi_children(Object *o, struct do_nmi_s *ns)
> 
> Above declared as static and implemented non-static.

No, it is implemented as static, by definition of the C language (the
compiler does not require you to repeat the 'static', but it still
honors all attributes present on either the declaration or the
implementation).  Although you are right that it looks inconsistent.

On the other hand, if the function is not mutually recursive with
something else in the file, I personally prefer hoisting static
functions to be implemented in topological order, instead of finding a
static declaration and then having to hunt for the body.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to