checksum_impl.h fails cpluspluscheck - Mailing list pgsql-hackers

From Peter Eisentraut
Subject checksum_impl.h fails cpluspluscheck
Date
Msg-id 51CFAC47.2070604@gmx.net
Whole thread Raw
Responses Re: checksum_impl.h fails cpluspluscheck
Re: checksum_impl.h fails cpluspluscheck
List 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?



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: request a new feature in fuzzystrmatch
Next
From: Tom Lane
Date:
Subject: Re: checksum_impl.h fails cpluspluscheck