Dynare++: fixed warnings about printf format strings
parent
ac9415a943
commit
757d8c36e9
|
@ -1,6 +1,4 @@
|
|||
// $Id: dynare_simul.cpp 1488 2007-12-19 14:16:30Z kamenik $
|
||||
|
||||
// Copyright 2005, Ondra Kamenik
|
||||
// Copyright (C) 2005-2011, Ondra Kamenik
|
||||
|
||||
// This is the mexFunction providing interface to
|
||||
// DecisionRule<>::simulate(). It takes the following input
|
||||
|
@ -87,13 +85,13 @@ extern "C" {
|
|||
if (ft.ncols() != gk_dim[1]) {
|
||||
char buf[1000];
|
||||
sprintf(buf, "Wrong number of columns for folded tensor: got %d but I want %d\n",
|
||||
gk_dim[1], ft.ncols());
|
||||
(int) gk_dim[1], ft.ncols());
|
||||
DYN_MEX_FUNC_ERR_MSG_TXT(buf);
|
||||
}
|
||||
if (ft.nrows() != gk_dim[0]) {
|
||||
char buf[1000];
|
||||
sprintf(buf, "Wrong number of rows for folded tensor: got %d but I want %d\n",
|
||||
gk_dim[0], ft.nrows());
|
||||
(int) gk_dim[0], ft.nrows());
|
||||
DYN_MEX_FUNC_ERR_MSG_TXT(buf);
|
||||
}
|
||||
ft.zeros();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
// Copyright (C) 2008-2011, Ondra Kamenik
|
||||
|
||||
#include "parser/cc/matrix_parser.h"
|
||||
#include "utils/cc/memory_file.h"
|
||||
|
@ -141,7 +141,7 @@ int main(int argc, char** argv)
|
|||
delete *it;
|
||||
points.erase(new_end, points.end());
|
||||
|
||||
printf("Duplicit nodes removed: %d\n", sq.numEvals(level)-points.size());
|
||||
printf("Duplicit nodes removed: %zd\n", sq.numEvals(level)-points.size());
|
||||
|
||||
// calculate weights and mass
|
||||
double mass = 0.0;
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
/* $Header: /var/lib/cvs/dynare_cpp/sylv/cc/Vector.cpp,v 1.1.1.1 2004/06/04 13:01:13 kamenik Exp $ */
|
||||
|
||||
/* Tag $Name: $ */
|
||||
|
||||
// Copyright (C) 2004-2011, Ondra Kamenik
|
||||
|
||||
#include "Vector.h"
|
||||
#include "GeneralMatrix.h"
|
||||
|
@ -44,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=%d, len=%d\n", destroy, v.destroy, data-v.data, len);
|
||||
printf("this destroy=%d, v destroy=%d, data-v.data=%zd, len=%d\n", destroy, v.destroy, data-v.data, len);
|
||||
throw SYLV_MES_EXCEPTION("Attempt to assign overlapping vectors.");
|
||||
}
|
||||
copy(v.base(), v.skip());
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
@q $Id: symmetry.cweb 148 2005-04-19 15:12:26Z kamenik $ @>
|
||||
@q Copyright 2004, Ondra Kamenik @>
|
||||
@q Copyright (C) 2004-2011, Ondra Kamenik @>
|
||||
|
||||
@ Start of {\tt symmetry.cpp} file.
|
||||
|
||||
|
@ -146,7 +145,7 @@ InducedSymmetries::InducedSymmetries(const Equivalence& e, const Permutation& p,
|
|||
@<|InducedSymmetries::print| code@>=
|
||||
void InducedSymmetries::print() const
|
||||
{
|
||||
printf("Induced symmetries: %d\n",size());
|
||||
printf("Induced symmetries: %zd\n",size());
|
||||
for (unsigned int i = 0; i < size(); i++)
|
||||
operator[](i).print();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue