aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_ts.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-11-28 08:19:22 +0100
committerPeter Eisentraut <peter@eisentraut.org>2024-11-28 08:27:20 +0100
commit7f798aca1d5df290aafad41180baea0ae311b4ee (patch)
treeb4c8132ec85c21f6c72308b5857defd70958de69 /contrib/btree_gist/btree_ts.c
parent97525bc5c8ffb31475d23955d08e9ec9c1408f33 (diff)
downloadpostgresql-7f798aca1d5df290aafad41180baea0ae311b4ee.tar.gz
postgresql-7f798aca1d5df290aafad41180baea0ae311b4ee.zip
Remove useless casts to (void *)
Many of them just seem to have been copied around for no real reason. Their presence causes (small) risks of hiding actual type mismatches or silently discarding qualifiers Discussion: https://www.postgresql.org/message-id/flat/461ea37c-8b58-43b4-9736-52884e862820@eisentraut.org
Diffstat (limited to 'contrib/btree_gist/btree_ts.c')
-rw-r--r--contrib/btree_gist/btree_ts.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c
index b3cf2d6f60d..9e0d979dda9 100644
--- a/contrib/btree_gist/btree_ts.c
+++ b/contrib/btree_gist/btree_ts.c
@@ -265,7 +265,7 @@ gbt_ts_consistent(PG_FUNCTION_ARGS)
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
@@ -282,7 +282,7 @@ gbt_ts_distance(PG_FUNCTION_ARGS)
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
&tinfo, fcinfo->flinfo));
}
@@ -306,7 +306,7 @@ gbt_tstz_consistent(PG_FUNCTION_ARGS)
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
qqq = tstz_to_ts_gmt(query);
- PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
+ PG_RETURN_BOOL(gbt_num_consistent(&key, &qqq, &strategy,
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
@@ -325,7 +325,7 @@ gbt_tstz_distance(PG_FUNCTION_ARGS)
key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
qqq = tstz_to_ts_gmt(query);
- PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &qqq, GIST_LEAF(entry),
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, &qqq, GIST_LEAF(entry),
&tinfo, fcinfo->flinfo));
}
@@ -337,7 +337,7 @@ gbt_ts_union(PG_FUNCTION_ARGS)
void *out = palloc(sizeof(tsKEY));
*(int *) PG_GETARG_POINTER(1) = sizeof(tsKEY);
- PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+ PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
}