aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2021-01-05 11:50:11 +0000
committerDean Rasheed <dean.a.rasheed@gmail.com>2021-01-05 11:50:11 +0000
commit740780a6157f0688829082dec793fce6153a36a3 (patch)
treef2189b9e01669545eaeca0b5de8b836ffb64cc0d /src/backend/utils/adt/numeric.c
parent258b7700551c4fc01ecd55d7ead4085184d4dce3 (diff)
downloadpostgresql-740780a6157f0688829082dec793fce6153a36a3.tar.gz
postgresql-740780a6157f0688829082dec793fce6153a36a3.zip
Add an explicit cast to double when using fabs().
Commit bc43b7c2c0 used fabs() directly on an int variable, which apparently requires an explicit cast on some platforms. Per buildfarm.
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
-rw-r--r--src/backend/utils/adt/numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c
index e347eaa885a..25bdb863fbe 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -8601,7 +8601,7 @@ power_var_int(const NumericVar *base, int exp, NumericVar *result, int rscale)
* to around log10(abs(exp)) digits, so work with this many extra digits
* of precision (plus a few more for good measure).
*/
- sig_digits += (int) log(fabs(exp)) + 8;
+ sig_digits += (int) log(fabs((double) exp)) + 8;
/*
* Now we can proceed with the multiplications.