From 1b81c2fe6ee2b26d37610c3d381a87fa17af0a7c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 11 Sep 2011 21:54:32 +0300 Subject: Remove many -Wcast-qual warnings This addresses only those cases that are easy to fix by adding or moving a const qualifier or removing an unnecessary cast. There are many more complicated cases remaining. --- contrib/pg_trgm/trgm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/pg_trgm/trgm.h') diff --git a/contrib/pg_trgm/trgm.h b/contrib/pg_trgm/trgm.h index 61de5d89d16..067f29d4daf 100644 --- a/contrib/pg_trgm/trgm.h +++ b/contrib/pg_trgm/trgm.h @@ -33,7 +33,7 @@ typedef char trgm[3]; #define CMPCHAR(a,b) ( ((a)==(b)) ? 0 : ( ((a)<(b)) ? -1 : 1 ) ) -#define CMPPCHAR(a,b,i) CMPCHAR( *(((char*)(a))+i), *(((char*)(b))+i) ) +#define CMPPCHAR(a,b,i) CMPCHAR( *(((const char*)(a))+i), *(((const char*)(b))+i) ) #define CMPTRGM(a,b) ( CMPPCHAR(a,b,0) ? CMPPCHAR(a,b,0) : ( CMPPCHAR(a,b,1) ? CMPPCHAR(a,b,1) : CMPPCHAR(a,b,2) ) ) #define CPTRGM(a,b) do { \ -- cgit v1.2.3