checksum_impl.h fails cpluspluscheck

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: checksum_impl.h fails cpluspluscheck
Date: 2013-06-30 03:55:51
Message-ID: 51CFAC47.2070604@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

./src/include/storage/checksum_impl.h: In function ‘uint32 pg_checksum_block(char*, uint32)’:
./src/include/storage/checksum_impl.h:154: warning: comparison between signed and unsigned integer expressions

We could exclude that file from the check, but it's also easy to fix by
making the variables unsigned:

diff --git a/src/include/storage/checksum_impl.h b/src/include/storage/checksum_impl.h
index ce1b124..7987b04 100644
--- a/src/include/storage/checksum_impl.h
+++ b/src/include/storage/checksum_impl.h
@@ -141,7 +141,7 @@ pg_checksum_block(char *data, uint32 size)
uint32 sums[N_SUMS];
uint32 (*dataArr)[N_SUMS] = (uint32 (*)[N_SUMS]) data;
uint32 result = 0;
- int i,
+ unsigned int i,
j;

/* ensure that the size is compatible with the algorithm */

Preferences?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-06-30 04:03:59 Re: checksum_impl.h fails cpluspluscheck
Previous Message Michael Paquier 2013-06-30 02:55:16 Re: request a new feature in fuzzystrmatch