Correct constness of a few variables.
Andres Freund <andres@anarazel.de>
Correct constness of a few variables.
This allows the compiler / linker to mark affected pages as read-only.
There's other cases, but they're a bit more invasive, and should go
through some review. These are easy.
They were found with
objdump -j .data -t src/backend/postgres|awk '{print $4, $5, $6}'|sort -r|less
Discussion: https://postgr.es/m/20181015200754.7y7zfuzsoux2c4ya@alap3.anarazel.de
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/event_trigger.c | modified | +2 −2 |
| src/backend/foreign/foreign.c | modified | +3 −3 |
| src/backend/libpq/pqcomm.c | modified | +2 −2 |
| src/backend/libpq/pqmq.c | modified | +1 −1 |
| src/backend/replication/basebackup.c | modified | +2 −2 |
| src/backend/storage/lmgr/generate-lwlocknames.pl | modified | +1 −1 |
| src/backend/utils/adt/cash.c | modified | +2 −2 |
| src/include/libpq/libpq.h | modified | +1 −1 |
| src/include/storage/lwlock.h | modified | +1 −1 |
Discussion
- Large writable variables 51 messages · 2018-10-15 → 2018-10-25