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 <r...@twiddle.net>
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? Stefan