[Top][All Lists]

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] util: Add 'static' attribute to

From: Stefan Weil
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] util: Add 'static' attribute to function implementation
Date: Sun, 16 Mar 2014 19:42:04 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Am 16.03.2014 19:06, schrieb Richard Henderson:
> On 03/16/2014 11:02 AM, Stefan Weil wrote:
>> 'static' is used in the forward declaration, but not in the implementation.
>> Add it there, too.
> You might consider reporting this as a bug in the analyzer, since the static 
> in
> the forward declaration does apply to the definition.
> That said, for style it's usually better to make them match, so,
> Reviewed-by: Richard Henderson <address@hidden>

Yes, the forward declaration applies here. IMHO it helps human reviewers
if they can see directly that some function is only local, therefore I
prefer the attribute 'static' at both code locations.

We have a similar situation with other attributes, too. Smatch also
complains about missing QEMU_NORETURN in our implementation code (we add
it only in header files for global functions). Do you think it would be
good to make header and implementation match there, too?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]