mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-29 22:49:41 +03:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -48,7 +48,7 @@ pq_writeint8(StringInfoData *pg_restrict buf, uint8 i) | |||||||
| 	uint8		ni = i; | 	uint8		ni = i; | ||||||
|  |  | ||||||
| 	Assert(buf->len + (int) sizeof(uint8) <= buf->maxlen); | 	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); | 	buf->len += sizeof(uint8); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -62,7 +62,7 @@ pq_writeint16(StringInfoData *pg_restrict buf, uint16 i) | |||||||
| 	uint16		ni = pg_hton16(i); | 	uint16		ni = pg_hton16(i); | ||||||
|  |  | ||||||
| 	Assert(buf->len + (int) sizeof(uint16) <= buf->maxlen); | 	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); | 	buf->len += sizeof(uint16); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -76,7 +76,7 @@ pq_writeint32(StringInfoData *pg_restrict buf, uint32 i) | |||||||
| 	uint32		ni = pg_hton32(i); | 	uint32		ni = pg_hton32(i); | ||||||
|  |  | ||||||
| 	Assert(buf->len + (int) sizeof(uint32) <= buf->maxlen); | 	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); | 	buf->len += sizeof(uint32); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -90,7 +90,7 @@ pq_writeint64(StringInfoData *pg_restrict buf, uint64 i) | |||||||
| 	uint64		ni = pg_hton64(i); | 	uint64		ni = pg_hton64(i); | ||||||
|  |  | ||||||
| 	Assert(buf->len + (int) sizeof(uint64) <= buf->maxlen); | 	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); | 	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); | 	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; | 	buf->len += slen + 1; | ||||||
|  |  | ||||||
| 	if (p != str) | 	if (p != str) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user