Skip to content

Commit 7f798ac

Browse files
committed
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
1 parent 97525bc commit 7f798ac

File tree

158 files changed

+491
-550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+491
-550
lines changed

contrib/amcheck/verify_nbtree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
719719
RelationGetRelationName(state->heaprel));
720720

721721
table_index_build_scan(state->heaprel, state->rel, indexinfo, true, false,
722-
bt_tuple_present_callback, (void *) state, scan);
722+
bt_tuple_present_callback, state, scan);
723723

724724
ereport(DEBUG1,
725725
(errmsg_internal("finished verifying presence of " INT64_FORMAT " tuples from table \"%s\" with bitset %.2f%% set",

contrib/bloom/blinsert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo)
139139

140140
/* Do the heap scan */
141141
reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
142-
bloomBuildCallback, (void *) &buildstate,
142+
bloomBuildCallback, &buildstate,
143143
NULL);
144144

145145
/* Flush last page if needed (it will be, unless heap was empty) */

contrib/bloom/blutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ initBloomState(BloomState *state, Relation index)
199199

200200
UnlockReleaseBuffer(buffer);
201201

202-
index->rd_amcache = (void *) opts;
202+
index->rd_amcache = opts;
203203
}
204204

205205
memcpy(&state->opts, index->rd_amcache, sizeof(state->opts));

contrib/btree_gist/btree_bit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Datum
136136
gbt_bit_consistent(PG_FUNCTION_ARGS)
137137
{
138138
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
139-
void *query = (void *) DatumGetByteaP(PG_GETARG_DATUM(1));
139+
void *query = DatumGetByteaP(PG_GETARG_DATUM(1));
140140
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
141141

142142
/* Oid subtype = PG_GETARG_OID(3); */

contrib/btree_gist/btree_bool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ gbt_bool_consistent(PG_FUNCTION_ARGS)
120120
key.lower = (GBT_NUMKEY *) &kkk->lower;
121121
key.upper = (GBT_NUMKEY *) &kkk->upper;
122122

123-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
123+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
124124
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
125125
}
126126

@@ -132,7 +132,7 @@ gbt_bool_union(PG_FUNCTION_ARGS)
132132
void *out = palloc(sizeof(boolKEY));
133133

134134
*(int *) PG_GETARG_POINTER(1) = sizeof(boolKEY);
135-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
135+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
136136
}
137137

138138

contrib/btree_gist/btree_bytea.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Datum
104104
gbt_bytea_consistent(PG_FUNCTION_ARGS)
105105
{
106106
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
107-
void *query = (void *) DatumGetByteaP(PG_GETARG_DATUM(1));
107+
void *query = DatumGetByteaP(PG_GETARG_DATUM(1));
108108
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
109109

110110
/* Oid subtype = PG_GETARG_OID(3); */

contrib/btree_gist/btree_cash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ gbt_cash_consistent(PG_FUNCTION_ARGS)
150150
key.lower = (GBT_NUMKEY *) &kkk->lower;
151151
key.upper = (GBT_NUMKEY *) &kkk->upper;
152152

153-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
153+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
154154
GIST_LEAF(entry), &tinfo,
155155
fcinfo->flinfo));
156156
}
@@ -169,7 +169,7 @@ gbt_cash_distance(PG_FUNCTION_ARGS)
169169
key.lower = (GBT_NUMKEY *) &kkk->lower;
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172-
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
172+
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
173173
&tinfo, fcinfo->flinfo));
174174
}
175175

@@ -181,7 +181,7 @@ gbt_cash_union(PG_FUNCTION_ARGS)
181181
void *out = palloc(sizeof(cashKEY));
182182

183183
*(int *) PG_GETARG_POINTER(1) = sizeof(cashKEY);
184-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
184+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
185185
}
186186

187187

contrib/btree_gist/btree_date.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ gbt_date_consistent(PG_FUNCTION_ARGS)
167167
key.lower = (GBT_NUMKEY *) &kkk->lower;
168168
key.upper = (GBT_NUMKEY *) &kkk->upper;
169169

170-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
170+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
171171
GIST_LEAF(entry), &tinfo,
172172
fcinfo->flinfo));
173173
}
@@ -186,7 +186,7 @@ gbt_date_distance(PG_FUNCTION_ARGS)
186186
key.lower = (GBT_NUMKEY *) &kkk->lower;
187187
key.upper = (GBT_NUMKEY *) &kkk->upper;
188188

189-
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
189+
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
190190
&tinfo, fcinfo->flinfo));
191191
}
192192

@@ -198,7 +198,7 @@ gbt_date_union(PG_FUNCTION_ARGS)
198198
void *out = palloc(sizeof(dateKEY));
199199

200200
*(int *) PG_GETARG_POINTER(1) = sizeof(dateKEY);
201-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
201+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
202202
}
203203

204204

contrib/btree_gist/btree_enum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ gbt_enum_consistent(PG_FUNCTION_ARGS)
137137
key.lower = (GBT_NUMKEY *) &kkk->lower;
138138
key.upper = (GBT_NUMKEY *) &kkk->upper;
139139

140-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
140+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
141141
GIST_LEAF(entry), &tinfo,
142142
fcinfo->flinfo));
143143
}
@@ -149,7 +149,7 @@ gbt_enum_union(PG_FUNCTION_ARGS)
149149
void *out = palloc(sizeof(oidKEY));
150150

151151
*(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
152-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
152+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
153153
}
154154

155155

contrib/btree_gist/btree_float4.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ gbt_float4_consistent(PG_FUNCTION_ARGS)
145145
key.lower = (GBT_NUMKEY *) &kkk->lower;
146146
key.upper = (GBT_NUMKEY *) &kkk->upper;
147147

148-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
148+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
149149
GIST_LEAF(entry), &tinfo,
150150
fcinfo->flinfo));
151151
}
@@ -164,7 +164,7 @@ gbt_float4_distance(PG_FUNCTION_ARGS)
164164
key.lower = (GBT_NUMKEY *) &kkk->lower;
165165
key.upper = (GBT_NUMKEY *) &kkk->upper;
166166

167-
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
167+
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
168168
&tinfo, fcinfo->flinfo));
169169
}
170170

@@ -176,7 +176,7 @@ gbt_float4_union(PG_FUNCTION_ARGS)
176176
void *out = palloc(sizeof(float4KEY));
177177

178178
*(int *) PG_GETARG_POINTER(1) = sizeof(float4KEY);
179-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
179+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
180180
}
181181

182182

contrib/btree_gist/btree_float8.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ gbt_float8_consistent(PG_FUNCTION_ARGS)
152152
key.lower = (GBT_NUMKEY *) &kkk->lower;
153153
key.upper = (GBT_NUMKEY *) &kkk->upper;
154154

155-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
155+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
156156
GIST_LEAF(entry), &tinfo,
157157
fcinfo->flinfo));
158158
}
@@ -171,7 +171,7 @@ gbt_float8_distance(PG_FUNCTION_ARGS)
171171
key.lower = (GBT_NUMKEY *) &kkk->lower;
172172
key.upper = (GBT_NUMKEY *) &kkk->upper;
173173

174-
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
174+
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
175175
&tinfo, fcinfo->flinfo));
176176
}
177177

@@ -183,7 +183,7 @@ gbt_float8_union(PG_FUNCTION_ARGS)
183183
void *out = palloc(sizeof(float8KEY));
184184

185185
*(int *) PG_GETARG_POINTER(1) = sizeof(float8KEY);
186-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
186+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
187187
}
188188

189189

contrib/btree_gist/btree_inet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ gbt_inet_consistent(PG_FUNCTION_ARGS)
138138
key.lower = (GBT_NUMKEY *) &kkk->lower;
139139
key.upper = (GBT_NUMKEY *) &kkk->upper;
140140

141-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query,
141+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query,
142142
&strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
143143
}
144144

@@ -150,7 +150,7 @@ gbt_inet_union(PG_FUNCTION_ARGS)
150150
void *out = palloc(sizeof(inetKEY));
151151

152152
*(int *) PG_GETARG_POINTER(1) = sizeof(inetKEY);
153-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
153+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
154154
}
155155

156156

contrib/btree_gist/btree_int2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ gbt_int2_consistent(PG_FUNCTION_ARGS)
150150
key.lower = (GBT_NUMKEY *) &kkk->lower;
151151
key.upper = (GBT_NUMKEY *) &kkk->upper;
152152

153-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
153+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
154154
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
155155
}
156156

@@ -168,7 +168,7 @@ gbt_int2_distance(PG_FUNCTION_ARGS)
168168
key.lower = (GBT_NUMKEY *) &kkk->lower;
169169
key.upper = (GBT_NUMKEY *) &kkk->upper;
170170

171-
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
171+
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
172172
&tinfo, fcinfo->flinfo));
173173
}
174174

@@ -180,7 +180,7 @@ gbt_int2_union(PG_FUNCTION_ARGS)
180180
void *out = palloc(sizeof(int16KEY));
181181

182182
*(int *) PG_GETARG_POINTER(1) = sizeof(int16KEY);
183-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
183+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
184184
}
185185

186186

contrib/btree_gist/btree_int4.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ gbt_int4_consistent(PG_FUNCTION_ARGS)
151151
key.lower = (GBT_NUMKEY *) &kkk->lower;
152152
key.upper = (GBT_NUMKEY *) &kkk->upper;
153153

154-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
154+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
155155
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
156156
}
157157

@@ -169,7 +169,7 @@ gbt_int4_distance(PG_FUNCTION_ARGS)
169169
key.lower = (GBT_NUMKEY *) &kkk->lower;
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172-
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
172+
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
173173
&tinfo, fcinfo->flinfo));
174174
}
175175

@@ -181,7 +181,7 @@ gbt_int4_union(PG_FUNCTION_ARGS)
181181
void *out = palloc(sizeof(int32KEY));
182182

183183
*(int *) PG_GETARG_POINTER(1) = sizeof(int32KEY);
184-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
184+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
185185
}
186186

187187

contrib/btree_gist/btree_int8.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ gbt_int8_consistent(PG_FUNCTION_ARGS)
151151
key.lower = (GBT_NUMKEY *) &kkk->lower;
152152
key.upper = (GBT_NUMKEY *) &kkk->upper;
153153

154-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
154+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
155155
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
156156
}
157157

@@ -169,7 +169,7 @@ gbt_int8_distance(PG_FUNCTION_ARGS)
169169
key.lower = (GBT_NUMKEY *) &kkk->lower;
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172-
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
172+
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
173173
&tinfo, fcinfo->flinfo));
174174
}
175175

@@ -181,7 +181,7 @@ gbt_int8_union(PG_FUNCTION_ARGS)
181181
void *out = palloc(sizeof(int64KEY));
182182

183183
*(int *) PG_GETARG_POINTER(1) = sizeof(int64KEY);
184-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
184+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
185185
}
186186

187187

contrib/btree_gist/btree_interval.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ gbt_intv_consistent(PG_FUNCTION_ARGS)
224224
key.lower = (GBT_NUMKEY *) &kkk->lower;
225225
key.upper = (GBT_NUMKEY *) &kkk->upper;
226226

227-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
227+
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
228228
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
229229
}
230230

@@ -242,7 +242,7 @@ gbt_intv_distance(PG_FUNCTION_ARGS)
242242
key.lower = (GBT_NUMKEY *) &kkk->lower;
243243
key.upper = (GBT_NUMKEY *) &kkk->upper;
244244

245-
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) query, GIST_LEAF(entry),
245+
PG_RETURN_FLOAT8(gbt_num_distance(&key, query, GIST_LEAF(entry),
246246
&tinfo, fcinfo->flinfo));
247247
}
248248

@@ -254,7 +254,7 @@ gbt_intv_union(PG_FUNCTION_ARGS)
254254
void *out = palloc(sizeof(intvKEY));
255255

256256
*(int *) PG_GETARG_POINTER(1) = sizeof(intvKEY);
257-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
257+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
258258
}
259259

260260

contrib/btree_gist/btree_macaddr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ gbt_macad_consistent(PG_FUNCTION_ARGS)
141141
key.lower = (GBT_NUMKEY *) &kkk->lower;
142142
key.upper = (GBT_NUMKEY *) &kkk->upper;
143143

144-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
144+
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
145145
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
146146
}
147147

@@ -153,7 +153,7 @@ gbt_macad_union(PG_FUNCTION_ARGS)
153153
void *out = palloc0(sizeof(macKEY));
154154

155155
*(int *) PG_GETARG_POINTER(1) = sizeof(macKEY);
156-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
156+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
157157
}
158158

159159

contrib/btree_gist/btree_macaddr8.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ gbt_macad8_consistent(PG_FUNCTION_ARGS)
141141
key.lower = (GBT_NUMKEY *) &kkk->lower;
142142
key.upper = (GBT_NUMKEY *) &kkk->upper;
143143

144-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
144+
PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
145145
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
146146
}
147147

@@ -153,7 +153,7 @@ gbt_macad8_union(PG_FUNCTION_ARGS)
153153
void *out = palloc0(sizeof(mac8KEY));
154154

155155
*(int *) PG_GETARG_POINTER(1) = sizeof(mac8KEY);
156-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
156+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
157157
}
158158

159159

contrib/btree_gist/btree_numeric.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Datum
108108
gbt_numeric_consistent(PG_FUNCTION_ARGS)
109109
{
110110
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
111-
void *query = (void *) DatumGetNumeric(PG_GETARG_DATUM(1));
111+
void *query = DatumGetNumeric(PG_GETARG_DATUM(1));
112112
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
113113

114114
/* Oid subtype = PG_GETARG_OID(3); */

contrib/btree_gist/btree_oid.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ gbt_oid_consistent(PG_FUNCTION_ARGS)
151151
key.lower = (GBT_NUMKEY *) &kkk->lower;
152152
key.upper = (GBT_NUMKEY *) &kkk->upper;
153153

154-
PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
154+
PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
155155
GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
156156
}
157157

@@ -169,7 +169,7 @@ gbt_oid_distance(PG_FUNCTION_ARGS)
169169
key.lower = (GBT_NUMKEY *) &kkk->lower;
170170
key.upper = (GBT_NUMKEY *) &kkk->upper;
171171

172-
PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
172+
PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
173173
&tinfo, fcinfo->flinfo));
174174
}
175175

@@ -181,7 +181,7 @@ gbt_oid_union(PG_FUNCTION_ARGS)
181181
void *out = palloc(sizeof(oidKEY));
182182

183183
*(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
184-
PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
184+
PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
185185
}
186186

187187

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy