Dynare++: in printf statements with size_t, remove %zd modifier introduced in

757d8c36e9 and replace it by %lu as a workaround.
The %zd modifier was introduced in C99 standard, but is not implemented by
MinGW.
time-shift
Sébastien Villemot 2011-01-15 19:07:26 +01:00
parent bc8b8e9c84
commit 6b1f84ac27
3 changed files with 3 additions and 3 deletions

View File

@ -141,7 +141,7 @@ int main(int argc, char** argv)
delete *it;
points.erase(new_end, points.end());
printf("Duplicit nodes removed: %zd\n", sq.numEvals(level)-points.size());
printf("Duplicit nodes removed: %lu\n", (unsigned long) (sq.numEvals(level)-points.size()));
// calculate weights and mass
double mass = 0.0;

View File

@ -41,7 +41,7 @@ const Vector& Vector::operator=(const Vector& v)
(data <= v.data && v.data < data+len*s ||
v.data <= data && data < v.data+v.len*v.s) &&
(data-v.data) % s == 0) {
printf("this destroy=%d, v destroy=%d, data-v.data=%zd, len=%d\n", destroy, v.destroy, data-v.data, len);
printf("this destroy=%d, v destroy=%d, data-v.data=%lu, len=%d\n", destroy, v.destroy, (unsigned long) (data-v.data), len);
throw SYLV_MES_EXCEPTION("Attempt to assign overlapping vectors.");
}
copy(v.base(), v.skip());

View File

@ -145,7 +145,7 @@ InducedSymmetries::InducedSymmetries(const Equivalence& e, const Permutation& p,
@<|InducedSymmetries::print| code@>=
void InducedSymmetries::print() const
{
printf("Induced symmetries: %zd\n",size());
printf("Induced symmetries: %lu\n", (unsigned long) size());
for (unsigned int i = 0; i < size(); i++)
operator[](i).print();
}