mirror of
https://github.com/postgres/postgres.git
synced 2025-08-15 14:02:29 +03:00
Remove many -Wcast-qual warnings
This addresses only those cases that are easy to fix by adding or moving a const qualifier or removing an unnecessary cast. There are many more complicated cases remaining.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
* when it is no longer needed.
|
||||
*/
|
||||
static uint8 *
|
||||
createPaddedCopyWithLength(uint8 *b, uint32 *l)
|
||||
createPaddedCopyWithLength(const uint8 *b, uint32 *l)
|
||||
{
|
||||
uint8 *ret;
|
||||
uint32 q;
|
||||
@@ -182,7 +182,7 @@ doTheRounds(uint32 X[16], uint32 state[4])
|
||||
}
|
||||
|
||||
static int
|
||||
calculateDigestFromBuffer(uint8 *b, uint32 len, uint8 sum[16])
|
||||
calculateDigestFromBuffer(const uint8 *b, uint32 len, uint8 sum[16])
|
||||
{
|
||||
register uint32 i,
|
||||
j,
|
||||
@@ -291,7 +291,7 @@ pg_md5_hash(const void *buff, size_t len, char *hexsum)
|
||||
{
|
||||
uint8 sum[16];
|
||||
|
||||
if (!calculateDigestFromBuffer((uint8 *) buff, len, sum))
|
||||
if (!calculateDigestFromBuffer(buff, len, sum))
|
||||
return false;
|
||||
|
||||
bytesToHex(sum, hexsum);
|
||||
@@ -301,7 +301,7 @@ pg_md5_hash(const void *buff, size_t len, char *hexsum)
|
||||
bool
|
||||
pg_md5_binary(const void *buff, size_t len, void *outbuf)
|
||||
{
|
||||
if (!calculateDigestFromBuffer((uint8 *) buff, len, outbuf))
|
||||
if (!calculateDigestFromBuffer(buff, len, outbuf))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user