[PPL-devel] [GIT] ppl/ppl(master): Avoid implicit integral conversion reducing size of underlying type.

Enea Zaffanella zaffanella at cs.unipr.it
Thu Nov 3 15:20:50 CET 2011


Module: ppl/ppl
Branch: master
Commit: ad542abaf25726e348754a9fb139074f6df9f81b
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=ad542abaf25726e348754a9fb139074f6df9f81b

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Thu Nov  3 15:19:21 2011 +0100

Avoid implicit integral conversion reducing size of underlying type.
Detected by ECLAIR service utypflag.

---

 src/checked.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/checked.cc b/src/checked.cc
index ed71a67..d1a8aed 100644
--- a/src/checked.cc
+++ b/src/checked.cc
@@ -278,7 +278,7 @@ parse_number_part(std::istream& is, number_struct& num) {
       exp:
         state = EXPONENT;
         max_exp_div = LONG_MAX / num.base;
-        max_exp_rem = LONG_MAX % num.base;
+        max_exp_rem = static_cast<int>(LONG_MAX % num.base);
         if (!is.get(c))
           return V_CVT_STR_UNK;
         if (c == '-') {




More information about the PPL-devel mailing list