[PPL-devel] [GIT] ppl/ppl(master): Fixed a bug whereby a wrong computational weight was computed due to missing parentheses around a macro argument .
Roberto Bagnara
bagnara at cs.unipr.it
Fri Oct 21 17:47:22 CEST 2011
Module: ppl/ppl
Branch: master
Commit: 8014bfef880f3b3dc0be3ee29b2c7d82472ba222
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=8014bfef880f3b3dc0be3ee29b2c7d82472ba222
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Fri Oct 21 17:45:17 2011 +0200
Fixed a bug whereby a wrong computational weight was computed due to missing parentheses around a macro argument.
Detected by ECLAIR service macrbody.
---
src/globals.defs.hh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/globals.defs.hh b/src/globals.defs.hh
index 310f133..6c45381 100644
--- a/src/globals.defs.hh
+++ b/src/globals.defs.hh
@@ -158,11 +158,11 @@ extern unsigned int in_assert;
#define WEIGHT_BEGIN()
#define WEIGHT_ADD(delta) \
do { \
- Weightwatch_Traits::weight += delta; \
+ Weightwatch_Traits::weight += (delta); \
} while(0)
#define WEIGHT_ADD_MUL(delta, factor) \
do { \
- Weightwatch_Traits::weight += delta * factor; \
+ Weightwatch_Traits::weight += (delta)*(factor); \
} while(0)
#endif
#else
More information about the PPL-devel
mailing list