On 12 August 2011 15:54, Pierre Vittet wrote: > > For the moment, the plugin has only be tested on C code, this might > works with only few changes for C++.
Would your example tests for grub warn about the following C++ code?
struct Guard {
Guard(void* p) : p(p) { if (!p) throw std::bad_alloc(); }
~Guard() { grub_free(p); }
void* p;
};
void func(grub_size_t n)
{
Guard g(grub_malloc(n));
// do something with g.p
}
For it to be useful for C++ it would be necessary to not warn about that code.
