A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[sonar] Explicit cast when loosing precision (C examples).
[simgrid.git]
/
examples
/
c
/
cloud-capping
/
cloud-capping.c
diff --git
a/examples/c/cloud-capping/cloud-capping.c
b/examples/c/cloud-capping/cloud-capping.c
index aafc0dc20b2572bf649e50f5fe816966cbf53610..bc3de023fdcecaf27423c097e0cca36866fb6d9b 100644
(file)
--- a/
examples/c/cloud-capping/cloud-capping.c
+++ b/
examples/c/cloud-capping/cloud-capping.c
@@
-20,7
+20,7
@@
static void worker_main(int argc, char* argv[])
{
xbt_assert(argc == 4);
double computation_amount = xbt_str_parse_double(argv[1], "Invalid computation amount: %s");
{
xbt_assert(argc == 4);
double computation_amount = xbt_str_parse_double(argv[1], "Invalid computation amount: %s");
- int use_bound = xbt_str_parse_int(argv[2], "Second parameter (use_bound) should be 0 or 1 but is: %s");
+ int use_bound =
!!
xbt_str_parse_int(argv[2], "Second parameter (use_bound) should be 0 or 1 but is: %s");
double bound = xbt_str_parse_double(argv[3], "Invalid bound: %s");
double clock_sta = simgrid_get_clock();
double bound = xbt_str_parse_double(argv[3], "Invalid bound: %s");
double clock_sta = simgrid_get_clock();