Re: Unused header file inclusion
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-31T06:01:15Z
Lists: pgsql-hackers
On Wed, Jul 31, 2019 at 11:26 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Wed, Jul 31, 2019 at 11:19:08AM +0530, vignesh C wrote: > > I noticed that there are many header files being included which need > > not be included. I have tried this in a few files and found the > > compilation and regression to be working. I have attached the patch > > for the files that I tried. I tried this in CentOS, I did not find > > the header files to be platform specific. > > Should we pursue this further and cleanup in all the files? > > Do you use a particular method here or just manual deduction after > looking at each file individually? If this can be cleaned up a bit, I > think that's welcome. The removal of headers is easily forgotten when > moving code from one file to another... > Thanks Michael. I'm writing some perl scripts to identify this. The script will scan through all the files, make changes, and verify. Finally it will give the changed files. Regards, Vignesh EnterpriseDB: http://www.enterprisedb.com
Commits
-
Add fmgr.h include to selfuncs.h.
- 4c01a1110388 13.0 landed
-
Add "headerscheck" script to test header-file compilability under C.
- 55ea10918847 13.0 landed
-
Fix failure-to-compile-standalone in scripts_parallel.h.
- 5f110933e114 13.0 landed
-
Remove fmgr.h includes from headers that don't really need it.
- fb3b098fe884 13.0 landed
-
Don't include utils/array.h from acl.h.
- 6a04d345fd80 13.0 landed
-
Remove redundant prototypes for SQL callable functions.
- 0ae2dc4db2ae 13.0 landed
-
Remove unnecessary #include <limits.h>
- e1f4c481b995 13.0 landed
-
Teach tuplesort.c about "top N" sorting, in which only the first N tuples
- d26559dbf356 8.3.0 cited