diff options
| author | Peter Eisentraut <peter@eisentraut.org> | 2025-10-27 08:52:39 +0100 |
|---|---|---|
| committer | Peter Eisentraut <peter@eisentraut.org> | 2025-10-27 08:53:09 +0100 |
| commit | 64d2b0968ea494cb11900ffb7681b5784e4112b9 (patch) | |
| tree | 1e345d275e6603f0d877c784e4a31745adfb13b6 | |
| parent | e0dc4bbfb88546cbbe53cfc7f8e9aca8e256adff (diff) | |
Remove meaninglist restrict qualifiers
The use of the restrict qualifier in casts is meaningless, so remove
them.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/0e3d8644-c01d-4374-86ea-9f0a987981f0%40eisentraut.org
| -rw-r--r-- | src/include/libpq/pqformat.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/libpq/pqformat.h b/src/include/libpq/pqformat.h index 9a1534be521..55442caf0e4 100644 --- a/src/include/libpq/pqformat.h +++ b/src/include/libpq/pqformat.h @@ -48,7 +48,7 @@ pq_writeint8(StringInfoData *pg_restrict buf, uint8 i) uint8 ni = i; Assert(buf->len + (int) sizeof(uint8) <= buf->maxlen); - memcpy((char *pg_restrict) (buf->data + buf->len), &ni, sizeof(uint8)); + memcpy(buf->data + buf->len, &ni, sizeof(uint8)); buf->len += sizeof(uint8); } @@ -62,7 +62,7 @@ pq_writeint16(StringInfoData *pg_restrict buf, uint16 i) uint16 ni = pg_hton16(i); Assert(buf->len + (int) sizeof(uint16) <= buf->maxlen); - memcpy((char *pg_restrict) (buf->data + buf->len), &ni, sizeof(uint16)); + memcpy(buf->data + buf->len, &ni, sizeof(uint16)); buf->len += sizeof(uint16); } @@ -76,7 +76,7 @@ pq_writeint32(StringInfoData *pg_restrict buf, uint32 i) uint32 ni = pg_hton32(i); Assert(buf->len + (int) sizeof(uint32) <= buf->maxlen); - memcpy((char *pg_restrict) (buf->data + buf->len), &ni, sizeof(uint32)); + memcpy(buf->data + buf->len, &ni, sizeof(uint32)); buf->len += sizeof(uint32); } @@ -90,7 +90,7 @@ pq_writeint64(StringInfoData *pg_restrict buf, uint64 i) uint64 ni = pg_hton64(i); Assert(buf->len + (int) sizeof(uint64) <= buf->maxlen); - memcpy((char *pg_restrict) (buf->data + buf->len), &ni, sizeof(uint64)); + memcpy(buf->data + buf->len, &ni, sizeof(uint64)); buf->len += sizeof(uint64); } @@ -116,7 +116,7 @@ pq_writestring(StringInfoData *pg_restrict buf, const char *pg_restrict str) Assert(buf->len + slen + 1 <= buf->maxlen); - memcpy(((char *pg_restrict) buf->data + buf->len), p, slen + 1); + memcpy(buf->data + buf->len, p, slen + 1); buf->len += slen + 1; if (p != str) |
