About removing "include <stdio.h>"

Stephan Bergmann sbergman at redhat.com
Mon May 4 23:58:33 PDT 2015


On 05/04/2015 10:49 PM, julien2412 wrote:
> Concerning tdf#42949: "accelerating compile times by removing unnecessary
> header #include" (see
> https://bugs.documentfoundation.org/show_bug.cgi?id=42949) Since most of the
> code is C++, could we consider that doing this would be ok:
> - remove "include <stdio.h>" in every hxx/cxx file
> - make clean && make (with enable-dbgutil)
> - if ok, submit to review so Jenkins could test the patch in all the envs
> (since I'd test this only on Linux)
>
> or are there some tricks to consider for stdio use?

Nothing special about <stdio.h> (aka <cstdio>), feel free to remove it 
from every file where, by whatever mechanism, you can prove that it is 
not necessary to include.  (Though it is unclear to me how much removing 
redundant includes of standard headers actually helps"accelerating 
compile times" in practice.)


More information about the LibreOffice mailing list