Skip to content
Snippets Groups Projects
Commit af18d3d0 authored by Tom Lane's avatar Tom Lane
Browse files

Fix compile warning on Solaris, per buildfarm. (Why have we got

three slightly different copies of this file?)
parent cd54eb2b
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,7 @@ static const unsigned int crc32tab[256] = { ...@@ -90,7 +90,7 @@ static const unsigned int crc32tab[256] = {
unsigned int unsigned int
crc32_sz(char *buf, int size) crc32_sz(char *buf, int size)
{ {
unsigned int crc = ~0; unsigned int crc = ~((unsigned int) 0);
char *p; char *p;
int len, int len,
nr; nr;
......
/* Both POSIX and CRC32 checksums */ /* Both POSIX and CRC32 checksums */
/* $PostgreSQL: pgsql/contrib/ltree/crc32.c,v 1.7 2006/09/22 21:39:57 tgl Exp $ */ /* $PostgreSQL: pgsql/contrib/ltree/crc32.c,v 1.8 2007/07/15 22:40:28 tgl Exp $ */
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h> #include <stdio.h>
...@@ -99,7 +99,7 @@ static const unsigned int crc32tab[256] = { ...@@ -99,7 +99,7 @@ static const unsigned int crc32tab[256] = {
unsigned int unsigned int
ltree_crc32_sz(char *buf, int size) ltree_crc32_sz(char *buf, int size)
{ {
unsigned int crc = ~0; unsigned int crc = ~((unsigned int) 0);
char *p; char *p;
int len, int len,
nr; nr;
......
/* Both POSIX and CRC32 checksums */ /* Both POSIX and CRC32 checksums */
/* $PostgreSQL: pgsql/contrib/tsearch2/crc32.c,v 1.3 2006/03/11 04:38:30 momjian Exp $ */ /* $PostgreSQL: pgsql/contrib/tsearch2/crc32.c,v 1.4 2007/07/15 22:40:28 tgl Exp $ */
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h> #include <stdio.h>
...@@ -92,7 +92,7 @@ static const unsigned int crc32tab[256] = { ...@@ -92,7 +92,7 @@ static const unsigned int crc32tab[256] = {
unsigned int unsigned int
crc32_sz(char *buf, int size) crc32_sz(char *buf, int size)
{ {
unsigned int crc = ~0; unsigned int crc = ~((unsigned int) 0);
char *p; char *p;
int len, int len,
nr; nr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment