Content-Length: 288780 | pFad | http://github.com/postgrespro/postgres/commit/994d76707a254da6d03e389fa46141371a99e4e1

D3 Fix misuse of "const" qualifier. · postgrespro/postgres@994d767 · GitHub
Skip to content

Commit 994d767

Browse files
committed
Fix misuse of "const" qualifier.
"const foo *" is quite different from "foo * const". This code was evidently trying to avoid casting away const from the arguments, but entirely failed to do so. Per study of some buildfarm warnings from anole (which unfortunately are mostly ignorable, since it seems not to understand "restrict" very well). I'm surprised though that nothing else has complained.
1 parent 7e6124c commit 994d767

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/partitioning/partbounds.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3793,8 +3793,8 @@ partition_hash_bsearch(PartitionBoundInfo boundinfo,
37933793
static int32
37943794
qsort_partition_hbound_cmp(const void *a, const void *b)
37953795
{
3796-
PartitionHashBound *const h1 = (PartitionHashBound *const) a;
3797-
PartitionHashBound *const h2 = (PartitionHashBound *const) b;
3796+
const PartitionHashBound *h1 = (const PartitionHashBound *) a;
3797+
const PartitionHashBound *h2 = (const PartitionHashBound *) b;
37983798

37993799
return partition_hbound_cmp(h1->modulus, h1->remainder,
38003800
h2->modulus, h2->remainder);
@@ -3808,8 +3808,8 @@ qsort_partition_hbound_cmp(const void *a, const void *b)
38083808
static int32
38093809
qsort_partition_list_value_cmp(const void *a, const void *b, void *arg)
38103810
{
3811-
Datum val1 = ((PartitionListValue *const) a)->value,
3812-
val2 = ((PartitionListValue *const) b)->value;
3811+
Datum val1 = ((const PartitionListValue *) a)->value,
3812+
val2 = ((const PartitionListValue *) b)->value;
38133813
PartitionKey key = (PartitionKey) arg;
38143814

38153815
return DatumGetInt32(FunctionCall2Coll(&key->partsupfunc[0],

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/994d76707a254da6d03e389fa46141371a99e4e1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy