From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Small miscellaneus fixes (Part II) |
Date: | 2022-11-25 21:27:04 |
Message-ID: | CAEudQAp2R2fbbi0OHHhv_n4=Ch0t1VtjObR9YMqtGKHJ+faUFQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi.
There another assorted fixes to the head branch.
1. Avoid useless pointer increment
(src/backend/utils/activity/pgstat_shmem.c)
The pointer *p, is used in creation dsa memory,
not p + MAXALIGN(pgstat_dsa_init_size()).
2. Discard result unused (src/backend/access/transam/xlogrecovery.c)
Some compilers raise warnings about discarding return from strtoul.
3. Fix dead code (src/bin/pg_dump/pg_dump.c)
tbinfo->relkind == RELKIND_MATVIEW is always true, so "INDEX"
is never hit.
Per Coverity.
4. Fix dead code (src/backend/utils/adt/formatting.c)
Np->sign == '+', is different than "!= '-'" and is different than "!= '+'"
So the else is never hit.
Per Coverity.
5. Use boolean operator with boolean operands
(b/src/backend/commands/tablecmds.c)
regards,
Ranier Vilela
Attachment | Content-Type | Size |
---|---|---|
avoid_useless_pointer_increment.patch | application/octet-stream | 506 bytes |
discard_strtoul_unused_result.patch | application/octet-stream | 581 bytes |
fix_dead_code_pg_dump.patch | application/octet-stream | 534 bytes |
fix_dead_code_formatting.patch | application/octet-stream | 565 bytes |
use_boolean_operator_with_boolean_operands.patch | application/octet-stream | 613 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Borisov | 2022-11-25 21:31:06 | Re: Use fadvise in wal replay |
Previous Message | Pavel Borisov | 2022-11-25 21:10:57 | Re: Use fadvise in wal replay |