Browse Source

PH,PM,PS: cast jints to int in printf

On Win32, jints are actually long ints, so printf would need %ld instead of %d.
As jints are 32bit, we simply cast to an int to silence format string compiler
warning.


git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12190 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 9 years ago
parent
commit
7c5eb10d37
  1. 2
      prism/src/hybrid/PH_NondetBoundedUntil.cc
  2. 2
      prism/src/hybrid/PH_ProbBoundedUntil.cc
  3. 2
      prism/src/hybrid/PH_ProbCumulReward.cc
  4. 2
      prism/src/hybrid/PH_ProbInstReward.cc
  5. 2
      prism/src/hybrid/PH_ProbTransient.cc
  6. 2
      prism/src/mtbdd/PM_NondetBoundedUntil.cc
  7. 2
      prism/src/mtbdd/PM_NondetInstReward.cc
  8. 2
      prism/src/mtbdd/PM_ProbBoundedUntil.cc
  9. 2
      prism/src/mtbdd/PM_ProbCumulReward.cc
  10. 2
      prism/src/mtbdd/PM_ProbInstReward.cc
  11. 2
      prism/src/mtbdd/PM_ProbTransient.cc
  12. 2
      prism/src/sparse/PS_NondetBoundedUntil.cc
  13. 2
      prism/src/sparse/PS_NondetCumulReward.cc
  14. 2
      prism/src/sparse/PS_NondetInstReward.cc
  15. 2
      prism/src/sparse/PS_NondetMultiReach1.cc
  16. 2
      prism/src/sparse/PS_NondetMultiReachReward1.cc
  17. 2
      prism/src/sparse/PS_ProbBoundedUntil.cc
  18. 2
      prism/src/sparse/PS_ProbCumulReward.cc
  19. 2
      prism/src/sparse/PS_ProbInstReward.cc
  20. 2
      prism/src/sparse/PS_ProbTransient.cc

2
prism/src/hybrid/PH_NondetBoundedUntil.cc

@ -235,7 +235,7 @@ jboolean min // min or max probabilities (true = min, false = max)
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PH_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/hybrid/PH_ProbBoundedUntil.cc

@ -199,7 +199,7 @@ jint bound // time bound
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PH_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/hybrid/PH_ProbCumulReward.cc

@ -194,7 +194,7 @@ jint bound // time bound
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PH_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/hybrid/PH_ProbInstReward.cc

@ -158,7 +158,7 @@ jint bound // time bound
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PH_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/hybrid/PH_ProbTransient.cc

@ -173,7 +173,7 @@ jint time // time
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, time);
PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)time);
if (do_ss_detect) PH_PrintToMainLog(env, "max %sdiff=%f, ", measure.isRelative()?"relative ":"", measure.value());
PH_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();

2
prism/src/mtbdd/PM_NondetBoundedUntil.cc

@ -131,7 +131,7 @@ jboolean min // min or max probabilities (true = min, false = max)
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PM_PrintToMainLog(env, "sol=%d nodes", DD_GetNumNodes(ddman, sol));
// NB: but tmp was probably bigger than sol (pre min/max-abstract)
PM_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));

2
prism/src/mtbdd/PM_NondetInstReward.cc

@ -119,7 +119,7 @@ jlong __jlongpointer in
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PM_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/mtbdd/PM_ProbBoundedUntil.cc

@ -107,7 +107,7 @@ jint bound // time bound
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PM_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/mtbdd/PM_ProbCumulReward.cc

@ -106,7 +106,7 @@ jint bound // time bound
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PM_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/mtbdd/PM_ProbInstReward.cc

@ -94,7 +94,7 @@ jint bound // time bound
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PM_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/mtbdd/PM_ProbTransient.cc

@ -111,7 +111,7 @@ jint time // time
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, time);
PM_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)time);
PM_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/sparse/PS_NondetBoundedUntil.cc

@ -179,7 +179,7 @@ jboolean min // min or max probabilities (true = min, false = max)
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PS_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/sparse/PS_NondetCumulReward.cc

@ -210,7 +210,7 @@ jboolean min // min or max probabilities (true = min, false = max)
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PS_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/sparse/PS_NondetInstReward.cc

@ -173,7 +173,7 @@ jlong __jlongpointer in
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PS_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/sparse/PS_NondetMultiReach1.cc

@ -160,7 +160,7 @@ JNIEXPORT jdouble __jlongpointer JNICALL Java_sparse_PrismSparse_PS_1NondetMulti
PS_PrintToMainLog(env, "%d Target combinations:\n", num_combinations);
for (i = 0; i < num_combinations; i++) {
PS_PrintToMainLog(env, "#%d: ", i);
PS_PrintToMainLog(env, "%d ", combinationIDs[i]);
PS_PrintToMainLog(env, "%d ", (int)combinationIDs[i]);
PS_PrintToMainLog(env, " (%.0f states)\n", DD_GetNumMinterms(ddman, combinations[i], num_rvars));
}

2
prism/src/sparse/PS_NondetMultiReachReward1.cc

@ -185,7 +185,7 @@ JNIEXPORT jdouble __jlongpointer JNICALL Java_sparse_PrismSparse_PS_1NondetMulti
PS_PrintToMainLog(env, "%d Target combinations:\n", num_combinations);
for (i = 0; i < num_combinations; i++) {
PS_PrintToMainLog(env, "#%d: ", i);
PS_PrintToMainLog(env, "%d ", combinationIDs[i]);
PS_PrintToMainLog(env, "%d ", (int)combinationIDs[i]);
PS_PrintToMainLog(env, " (%.0f states)\n", DD_GetNumMinterms(ddman, combinations[i], num_rvars));
}

2
prism/src/sparse/PS_ProbBoundedUntil.cc

@ -213,7 +213,7 @@ jint bound // time bound
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PS_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/sparse/PS_ProbCumulReward.cc

@ -215,7 +215,7 @@ jint bound // time bound
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PS_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/sparse/PS_ProbInstReward.cc

@ -181,7 +181,7 @@ jint bound // time bound
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, bound);
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)bound);
PS_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();
}

2
prism/src/sparse/PS_ProbTransient.cc

@ -197,7 +197,7 @@ jint time // time
// print occasional status update
if ((util_cpu_time() - start3) > UPDATE_DELAY) {
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, time);
PS_PrintToMainLog(env, "Iteration %d (of %d): ", iters, (int)time);
if (do_ss_detect) PS_PrintToMainLog(env, "max %sdiff=%f, ", measure.isRelative()?"relative ":"", measure.value());
PS_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000));
start3 = util_cpu_time();

Loading…
Cancel
Save