Browse Source

dd_export.cc: format string %zu is not supported on Windows, use portable PRIuPTR

Windows needs %Iu for fprinting size_t / uintptr_t values, use the portable
format string macro available in C++11.


git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12012 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 9 years ago
parent
commit
ce917c0248
  1. 6
      prism/src/dd/dd_export.cc

6
prism/src/dd/dd_export.cc

@ -31,6 +31,7 @@
#include <math.h> #include <math.h>
#include <util.h> #include <util.h>
#include <cudd.h> #include <cudd.h>
#include <cinttypes>
#include "dd.h" #include "dd.h"
#include "dd_basics.h" #include "dd_basics.h"
#include "dd_abstr.h" #include "dd_abstr.h"
@ -176,8 +177,9 @@ FILE *fp
if (!found) { if (!found) {
stored[count++] = dd; stored[count++] = dd;
} }
fprintf(fp, "%zu\n", (size_t)dd);
fprintf(fp, "%" PRIuPTR "\n", (uintptr_t)dd);
return 0; return 0;
} }

Loading…
Cancel
Save