aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-12-16 05:38:07 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-12-16 05:38:07 +0200
commit0570bab8a30cbd80df2e37c51300df499e68a61d (patch)
tree3e2fc69f150ea29eab10d995c3221ce300eab4eb
parent6dcb6d9c71c1ed42f68a5468db18b80b790fd281 (diff)
downloadegawk-0570bab8a30cbd80df2e37c51300df499e68a61d.tar.gz
egawk-0570bab8a30cbd80df2e37c51300df499e68a61d.tar.bz2
egawk-0570bab8a30cbd80df2e37c51300df499e68a61d.zip
Minor compile fix for non-MPFR builds.
-rw-r--r--ChangeLog5
-rw-r--r--profile.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f6957f6..5422776b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-16 Arnold D. Robbins <arnold@skeeve.com>
+
+ * profile.c (pp_number): Move count into ifdef for MPFR. Avoids
+ an unused variable warning if not compiling for MPFR.
+
2015-11-26 Arnold D. Robbins <arnold@skeeve.com>
* command.y (cmdtab): Add "exit" as synonym for "quit".
diff --git a/profile.c b/profile.c
index 5af7b929..dc89d006 100644
--- a/profile.c
+++ b/profile.c
@@ -1324,9 +1324,10 @@ pp_number(NODE *n)
{
#define PP_PRECISION 6
char *str;
- size_t count;
#ifdef HAVE_MPFR
+ size_t count;
+
if (is_mpg_float(n)) {
count = mpfr_get_prec(n->mpg_numbr) / 3; /* ~ 3.22 binary digits per decimal digit */
emalloc(str, char *, count, "pp_number");