On Wed, Mar 21, 2012 at 05:08:15PM +0000, Lee Essen wrote: > On Solaris/Illumos dtrace will remove the "const" qualifier from any > arguments when producing the header file, this results in hundreds > of compile-time warnings.
I wonder why DTrace does this, it seems wrong. If anything it should be the other way around with all DTrace arguments becoming const :). Will you submit a patch to preserve const in upstream DTrace? > I have put together a patch to tracetool to cast any const argument > appropriately to remove the warnings, but I don't know how it > behaves on any other dtrace platform. If the "const" isn't removed > then this patch will actually create warnings. Why would it introduce warnings, maybe I'm misunderstanding? The following generated .h code should work without warnings whether the DTRACE_FOO() is const char* or char*: void trace_foo(const char *s) { DTRACE_FOO((char *)s); } > Do you see these warnings on any other dtrace platform? If not, > then I'll need to make sure the patch is solaris-specific. I haven't seen this issue on SystemTap. Stefan