1
0
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:
Peter Eisentraut
2011-09-11 21:54:32 +03:00
parent 02bca4f351
commit 1b81c2fe6e
55 changed files with 219 additions and 218 deletions

View File

@@ -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;
}