summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorPeter Eisentraut2012-02-28 10:42:08 +0000
committerPeter Eisentraut2012-02-28 10:42:08 +0000
commit973e9fb294dc05a384ecae7623923ae53cb81806 (patch)
tree8f1499cd7e9de9b63e1ccff755d36393b1eb4aa7 /contrib
parent41e3c94cac0e68257126b2d264dc5e877e892490 (diff)
Add const qualifiers where they are accidentally cast away
This only produces warnings under -Wcast-qual, but it's more correct and consistent in any case.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/intarray/_intbig_gist.c2
-rw-r--r--contrib/ltree/ltree_gist.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/contrib/intarray/_intbig_gist.c b/contrib/intarray/_intbig_gist.c
index eb8f2826349..c6b00eaeff0 100644
--- a/contrib/intarray/_intbig_gist.c
+++ b/contrib/intarray/_intbig_gist.c
@@ -332,7 +332,7 @@ typedef struct
static int
comparecost(const void *a, const void *b)
{
- return ((SPLITCOST *) a)->cost - ((SPLITCOST *) b)->cost;
+ return ((const SPLITCOST *) a)->cost - ((const SPLITCOST *) b)->cost;
}
diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c
index 1c0fa88c3af..13d96656d2e 100644
--- a/contrib/ltree/ltree_gist.c
+++ b/contrib/ltree/ltree_gist.c
@@ -275,8 +275,8 @@ static int
treekey_cmp(const void *a, const void *b)
{
return ltree_compare(
- ((RIX *) a)->r,
- ((RIX *) b)->r
+ ((const RIX *) a)->r,
+ ((const RIX *) b)->r
);
}