|
From: Roberto D. <rd...@ti...> - 2006-03-01 08:26:35
|
Hi..
I am still getting familiar with the errors reported by valgrind..
Here :
void ServicioLog::hazPrintable (std::string &mensaje)
{
for (unsigned int i = 0; i < mensaje.size (); ++i)
{
if (!isprint (static_cast<int>(mensaje[i])))
/* ^^^^ the error is reported here*/
{
mensaje [i] = '#';
}
}
}
I get this:
Use of uninitialised value of size 4
==9984== at 0x4238855:
Comunicaciones::ServicioLog::hazPrintable(basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > &)
(ServicioLog.cpp:375)
I believe this can be due to the static_cast.. but I am not sure..
Is it?
Thank you very much
Roberto
|