checksum_impl.h fails cpluspluscheck

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема checksum_impl.h fails cpluspluscheck
Дата
Msg-id 51CFAC47.2070604@gmx.net
обсуждение исходный текст
Ответы Re: checksum_impl.h fails cpluspluscheck  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: checksum_impl.h fails cpluspluscheck  (Peter Geoghegan <pg@heroku.com>)
Список 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 по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: request a new feature in fuzzystrmatch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: checksum_impl.h fails cpluspluscheck