Minor pg_amcheck fixes spotted while reading code
Minor pg_amcheck fixes spotted while reading code
When perusing the pg_amcheck code the other day for the recently pushed fixes I found two small things that seem worth fixing: The help function progname parameter shadows the global variable of the same name, which no doubt will make static analyzers complain so we might as well fix that; and there is a tiny typo in the test stanza. Both fixed in the attached. -- Daniel Gustafsson https://vmware.com/
Re: Minor pg_amcheck fixes spotted while reading code
От:
Mark Dilger <mark.dilger@enterprisedb.com>
Дата:
> On Aug 20, 2021, at 11:19 AM, Daniel Gustafsson wrote: > > When perusing the pg_amcheck code the other day for the recently pushed fixes I > found two small things that seem worth fixing: The help function progname > parameter shadows the global variable of the same name, which no doubt will > make static analyzers complain so we might as well fix that; and there is a > tiny typo in the test stanza. > > Both fixed in the attached. > > -- > Daniel Gustafsson https://vmware.com/ > > <0001-Fix-variable-shadowing.patch><0002-pg_amcheck-test-typofix.patch> These look correct. — Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Re: Minor pg_amcheck fixes spotted while reading code
On Fri, Aug 20, 2021 at 11:42:09AM -0700, Mark Dilger wrote: > These look correct. static void -help(const char *progname) +help(const char *program_name) These were discussed not long ago, and I recall that they were in the we-don't-care category. Note for example all the tools of src/scripts/ and pg_dump/. -- Michael
Re: Minor pg_amcheck fixes spotted while reading code
От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 21 Aug 2021, at 02:43, Michael Paquier wrote: > > On Fri, Aug 20, 2021 at 11:42:09AM -0700, Mark Dilger wrote: >> These look correct. > > static void > -help(const char *progname) > +help(const char *program_name) > These were discussed not long ago, and I recall that they were in the > we-don't-care category. Note for example all the tools of > src/scripts/ and pg_dump/. Fair enough, I had missed that thread. -- Daniel Gustafsson https://vmware.com/