Browse Source

Fix a few compiler warnings.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10059 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 11 years ago
parent
commit
7eef2a266c
  1. 2
      prism/src/dd/dd_export.cc
  2. 2
      prism/src/mtbdd/PrismMTBDD.cc
  3. 3
      prism/src/sparse/PS_NondetMultiObjGS.cc
  4. 2
      prism/src/sparse/PrismSparse.cc

2
prism/src/dd/dd_export.cc

@ -177,7 +177,7 @@ FILE *fp
stored[count++] = dd; stored[count++] = dd;
} }
fprintf(fp, "%d\n", (size_t)dd);
fprintf(fp, "%zu\n", (size_t)dd);
return 0; return 0;
} }

2
prism/src/mtbdd/PrismMTBDD.cc

@ -207,7 +207,7 @@ void export_string(const char *str, ...)
va_end(argptr); va_end(argptr);
if (export_file) { if (export_file) {
fprintf(export_file, full_string);
fprintf(export_file, "%s", full_string);
} else { } else {
PM_PrintToMainLog(export_env, full_string); PM_PrintToMainLog(export_env, full_string);
} }

3
prism/src/sparse/PS_NondetMultiObjGS.cc

@ -372,11 +372,12 @@ JNIEXPORT jdoubleArray __jlongpointer JNICALL Java_sparse_PrismSparse_PS_1Nondet
else else
d1 = d2; d1 = d2;
for (int it = 0; it < lenRew + lenProb; it++) { for (int it = 0; it < lenRew + lenProb; it++) {
if (it != ignoredWeight)
if (it != ignoredWeight) {
if (fabs(pd2[it]) < near_zero) if (fabs(pd2[it]) < near_zero)
pd1[it] = 0; //round off small numbers to 0 pd1[it] = 0; //round off small numbers to 0
else else
pd1[it] = pd2[it]; pd1[it] = pd2[it];
}
} }
} }
first = false; first = false;

2
prism/src/sparse/PrismSparse.cc

@ -231,7 +231,7 @@ void export_string(const char *str, ...)
va_end(argptr); va_end(argptr);
if (export_file) { if (export_file) {
fprintf(export_file, full_string);
fprintf(export_file, "%s", full_string);
} else { } else {
PS_PrintToMainLog(export_env, full_string); PS_PrintToMainLog(export_env, full_string);
} }

Loading…
Cancel
Save