Re: [obv] Make 'disable_display' static.

Joel Brobecker
2013-01-11T11:32:57Z

> . why is it a good idea to go hunting for functions not used outside
> its source file and make them static? I don't see this
> requirement in any coding standards document pertinent to GDB.

I think it is a good idea, because it helps us (developers) a lot
when we see that a variable or function is static, and thus only
referenced within the unit.

It also helps the compiler, because it is now able to notify us
when a symbol is no longer referenced, and thus a candidate
for deletion. Without making them "static", we don't get the
compiler warning.

More generally, I think that everything should be static/const
by default, and anything that is not needs to explained (when
not obvious, or course).

> . if this is NOT mandated by any coding standards we try to enforce,
> why is this an "obvious" patch?

I do not necessarily consider these patches obvious, because
I've seen emails on this list suggesting that we seem to be flexible
with uncontributed code which might be needing the symbol to
be exported rather than static. But I think that they generally
go in the right direction and should be encouraged.

--
Joel