summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2021-01-05 11:45:17 +0000
committerDean Rasheed <dean.a.rasheed@gmail.com>2021-01-05 11:45:17 +0000
commitf0b9bada56f801fc9e70befb7206a72d5444eb8e (patch)
treecb0f6caa064cce22c0859d6b5f5cea9f868eaa42
parent9a299dff25a5f945cc2ee0c00b705857f966e169 (diff)
downloadpostgresql-f0b9bada56f801fc9e70befb7206a72d5444eb8e.tar.gz
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.
-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 f50da658a6..da639be40b 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -8182,7 +8182,7 @@ power_var_int(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.