gnucash maint: Fix signed int overflow warning.
John Ralls
jralls at code.gnucash.org
Mon Jun 9 10:29:35 EDT 2014
Updated via https://github.com/Gnucash/gnucash/commit/2c910ed1 (commit)
from https://github.com/Gnucash/gnucash/commit/8d723f1b (commit)
commit 2c910ed1bba7afcec307bacba61131f4e181e2ec
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Jun 9 08:34:20 2014 -0700
Fix signed int overflow warning.
diff --git a/src/libqof/qof/gnc-numeric.c b/src/libqof/qof/gnc-numeric.c
index 96ef3c2..5207ce2 100644
--- a/src/libqof/qof/gnc-numeric.c
+++ b/src/libqof/qof/gnc-numeric.c
@@ -43,14 +43,13 @@ static const gint64 pten[] = { 1, 10, 100, 1000, 10000, 100000, 1000000,
10000000, 100000000, 1000000000, 10000000000,
100000000000, 1000000000000, 10000000000000,
100000000000000, 10000000000000000,
- 100000000000000000, 1000000000000000000,
- 10000000000000000000};
+ 100000000000000000, 1000000000000000000};
#define POWTEN_OVERFLOW -5
static inline gint64
powten (int exp)
{
- if (exp > 19 || exp < -19)
+ if (exp > 18 || exp < -18)
return POWTEN_OVERFLOW;
return exp < 0 ? -pten[-exp] : pten[exp];
}
Summary of changes:
src/libqof/qof/gnc-numeric.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list