Correct compilation of osnet/dev/systrace/systrace.c under Clang

Mark arguments to dtrace_probe_lookup() with __UNCONST().
The proper fix constifying it causes pollution of const in too many files.

This could be done with -W flags, but they are incompatible between
compilers.

This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.

Sponsored by <The NetBSD Foundation>
This commit is contained in:
kamil 2018-06-06 17:47:10 +00:00
parent 3982d87926
commit 60490a027e

View File

@ -1,4 +1,4 @@
/* $NetBSD: systrace.c,v 1.10 2018/05/28 21:05:04 chs Exp $ */
/* $NetBSD: systrace.c,v 1.11 2018/06/06 17:47:10 kamil Exp $ */
/*
* CDDL HEADER START
@ -356,7 +356,7 @@ systrace_provide(void *arg, dtrace_probedesc_t *desc)
#else
const char *name = ALTSYSCALLNAMES[i] ? ALTSYSCALLNAMES[i] :
SYSCALLNAMES[i];
if (dtrace_probe_lookup(systrace_id, NULL, name, "entry") != 0)
if (dtrace_probe_lookup(systrace_id, NULL, __UNCONST(name), __UNCONST("entry")) != 0)
continue;
(void) dtrace_probe_create(systrace_id, NULL,