cppcheck/testmemset1/testmemset1.cpp

37 lines
376 B
C++
Raw Normal View History

2007-05-07 19:31:35 +02:00
class clKalle
{
private:
int i;
public:
clKalle();
};
struct S1
{
char *str;
}
struct S2
{
std::string str;
}
clKalle::clKalle()
{
i = 0;
}
void f()
{
clKalle *kalle = new clKalle;
memset(kalle, 0, sizeof(clKalle));
S1 s1;
memset(&s1, 0, sizeof(S1));
S2 s2;
memset(&s2, 0, sizeof(S2));
}