Fix compile warning on Solaris, per buildfarm. (Why have we got
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 15 Jul 2007 22:40:28 +0000 (22:40 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 15 Jul 2007 22:40:28 +0000 (22:40 +0000)
three slightly different copies of this file?)

contrib/hstore/crc32.c
contrib/ltree/crc32.c
contrib/tsearch2/crc32.c

index dc93db727c171b80024ce439cc10abfa4796bf47..5f4f7a3178c645ce615bdc353addebe7b64bf5ff 100644 (file)
@@ -90,7 +90,7 @@ static const unsigned int crc32tab[256] = {
 unsigned int
 crc32_sz(char *buf, int size)
 {
-       unsigned int crc = ~0;
+       unsigned int crc = ~((unsigned int) 0);
        char       *p;
        int                     len,
                                nr;
index 736230691593455943981a470ac625996c265d75..6736d15540cbcb0e39f19b91ae556acbcec4081f 100644 (file)
@@ -99,7 +99,7 @@ static const unsigned int crc32tab[256] = {
 unsigned int
 ltree_crc32_sz(char *buf, int size)
 {
-       unsigned int crc = ~0;
+       unsigned int crc = ~((unsigned int) 0);
        char       *p;
        int                     len,
                                nr;
index 27ffcfee37ebf8b2c52ae6a3f5c701711705b01b..b77c2d48277e9440c0074b962c7622c525a392b9 100644 (file)
@@ -92,7 +92,7 @@ static const unsigned int crc32tab[256] = {
 unsigned int
 crc32_sz(char *buf, int size)
 {
-       unsigned int crc = ~0;
+       unsigned int crc = ~((unsigned int) 0);
        char       *p;
        int                     len,
                                nr;