pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix incidental warnings from cpluspluscheck.
3+ messages / 2 participants
[nested] [flat]

* pgsql: Fix incidental warnings from cpluspluscheck.
@ 2019-08-18 23:01  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2019-08-18 23:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix incidental warnings from cpluspluscheck.

Remove use of "register" keyword in hashfn.c.  It's obsolescent
according to recent C++ compilers, and no modern C compiler pays
much attention to it either.

Also fix one cosmetic warning about signed vs unsigned comparison.

Discussion: https://postgr.es/m/20518.1559494394@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/232720be9b6412ec2b6bee405299bcbbbe700f0b

Modified Files
--------------
src/backend/utils/hash/hashfn.c   | 16 ++++++++--------
src/include/utils/expandeddatum.h |  2 +-
src/include/utils/hashutils.h     |  6 +++---
3 files changed, 12 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Fix incidental warnings from cpluspluscheck.
@ 2019-08-19 00:26  Thomas Munro <thomas.munro@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Thomas Munro @ 2019-08-19 00:26 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

On Mon, Aug 19, 2019 at 11:01 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Remove use of "register" keyword in hashfn.c.  It's obsolescent
> according to recent C++ compilers, and no modern C compiler pays
> much attention to it either.

We have some more of those:

src/backend/regex/regexec.c
src/common/md5.c
src/include/port/atomics/arch-x86.h
src/include/storage/s_lock.h
src/pl/plperl/ppport.h

-- 
Thomas Munro
https://enterprisedb.com





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Fix incidental warnings from cpluspluscheck.
@ 2019-08-19 00:41  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Thomas Munro <thomas.munro@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2019-08-19 00:41 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>

Thomas Munro <thomas.munro@gmail.com> writes:
> On Mon, Aug 19, 2019 at 11:01 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Remove use of "register" keyword in hashfn.c.  It's obsolescent
>> according to recent C++ compilers, and no modern C compiler pays
>> much attention to it either.

> We have some more of those:

> src/backend/regex/regexec.c
> src/common/md5.c
> src/include/port/atomics/arch-x86.h
> src/include/storage/s_lock.h
> src/pl/plperl/ppport.h

I was just getting rid of the ones that cpluspluscheck complained
about, which were in function prototypes. I doubt we want to touch
any of the register local variables in s_lock.h or arch-x86.h,
because they're all associated with asm sections that require them
to be registers anyway.  And ppport.h is not ours to change.
I have no objection to getting rid of the ones in regexec.c or
md5.c, though.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-08-19 00:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-08-18 23:01 pgsql: Fix incidental warnings from cpluspluscheck. Tom Lane <tgl@sss.pgh.pa.us>
2019-08-19 00:26 ` Thomas Munro <thomas.munro@gmail.com>
2019-08-19 00:41   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox