aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2021-01-05 11:48:45 +0000
committerDean Rasheed <dean.a.rasheed@gmail.com>2021-01-05 11:48:45 +0000
commitab042d0108232d4b8b6a2b104a466a4bb2f6b9f1 (patch)
tree24b5d912191c6d9c4fca159ef4d0a99f70795ea0 /src
parent160a9e425f18b248c87130fec9f04b77dceb60a3 (diff)
downloadpostgresql-ab042d0108232d4b8b6a2b104a466a4bb2f6b9f1.tar.gz
postgresql-ab042d0108232d4b8b6a2b104a466a4bb2f6b9f1.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')
-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 67fbf20a9d2..fbfae79c355 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -8433,7 +8433,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.