Comment #3 on issue 2302 by [email protected]: include/v8.h unused parameter warnings in g++ with show all warnings enabled
http://code.google.com/p/v8/issues/detail?id=2302

That's correct, the problem is that v8 is causing compiler warnings in another project. And it is undesireable to set -Wunused-parameter, since we want to catch all warnings. (What if every library required you to suppress a different warning?)

Perhaps you could do something like use an UNUSED() macro:

#define UNUSED(x) (void)(x)

Then one of your functions might look like:

static inline bool CanCastToHeapObject(Context* o) { UNUSED(o); return true; }

This has the benefit of:
a) Suppressing the warning in a compiler independent way.
b) It's very explicit about what is being done. (Unlike removing the var name, which is kind of subtle)
c) It's easy to find what variables are being unused in this way.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to