diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2011-09-11 21:54:32 +0300 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2011-09-11 21:54:32 +0300 |
commit | 1b81c2fe6ee2b26d37610c3d381a87fa17af0a7c (patch) | |
tree | 09075f19d47fd81df20beb96e27e0f21ad2a0729 /contrib/intarray | |
parent | 02bca4f35164dd1873eab9b8e6167e42a79157c4 (diff) | |
download | postgresql-1b81c2fe6ee2b26d37610c3d381a87fa17af0a7c.tar.gz postgresql-1b81c2fe6ee2b26d37610c3d381a87fa17af0a7c.zip |
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.
Diffstat (limited to 'contrib/intarray')
-rw-r--r-- | contrib/intarray/_int_gist.c | 4 | ||||
-rw-r--r-- | contrib/intarray/_int_tool.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c index 0a173bfcb66..0123906be88 100644 --- a/contrib/intarray/_int_gist.c +++ b/contrib/intarray/_int_gist.c @@ -357,10 +357,10 @@ typedef struct static int comparecost(const void *a, const void *b) { - if (((SPLITCOST *) a)->cost == ((SPLITCOST *) b)->cost) + if (((const SPLITCOST *) a)->cost == ((const SPLITCOST *) b)->cost) return 0; else - return (((SPLITCOST *) a)->cost > ((SPLITCOST *) b)->cost) ? 1 : -1; + return (((const SPLITCOST *) a)->cost > ((const SPLITCOST *) b)->cost) ? 1 : -1; } /* diff --git a/contrib/intarray/_int_tool.c b/contrib/intarray/_int_tool.c index bfc55501dbc..79f018d333b 100644 --- a/contrib/intarray/_int_tool.c +++ b/contrib/intarray/_int_tool.c @@ -388,15 +388,15 @@ int_to_intset(int32 n) int compASC(const void *a, const void *b) { - if (*(int4 *) a == *(int4 *) b) + if (*(const int4 *) a == *(const int4 *) b) return 0; - return (*(int4 *) a > *(int4 *) b) ? 1 : -1; + return (*(const int4 *) a > *(const int4 *) b) ? 1 : -1; } int compDESC(const void *a, const void *b) { - if (*(int4 *) a == *(int4 *) b) + if (*(const int4 *) a == *(const int4 *) b) return 0; - return (*(int4 *) a < *(int4 *) b) ? 1 : -1; + return (*(const int4 *) a < *(const int4 *) b) ? 1 : -1; } |