pfgerard/cppcheck — comment on commit 67c936b8b2fecc22a33ebdfd83fbaaa6f0026797
File: lib/checkbufferoverrun.cpp line 182
By kimmov:

This message does not make sense. `memset()` is not allocating any memory. You probably mean *accessing*. And it is perfectly OK to `memset()` stack variables. For example:

void foo()
{
char bar[20];
memset(bar, 0, 20);
}

or even:

void foo()
{
int bar;
memset(&bar, 0, sizeof(int));
}