Module Name: src
Committed By: kamil
Date: Wed Jun 6 17:19:49 UTC 2018
Modified Files:
src/external/cddl/osnet/dev/profile: profile.c
Log Message:
Correct compilation of osnet/dev/profile/profile.c under Clang
Constify char* types when initialized with liternals.
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>
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/cddl/osnet/dev/profile/profile.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/cddl/osnet/dev/profile/profile.c
diff -u src/external/cddl/osnet/dev/profile/profile.c:1.8 src/external/cddl/osnet/dev/profile/profile.c:1.9
--- src/external/cddl/osnet/dev/profile/profile.c:1.8 Mon May 28 21:05:03 2018
+++ src/external/cddl/osnet/dev/profile/profile.c Wed Jun 6 17:19:49 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: profile.c,v 1.8 2018/05/28 21:05:03 chs Exp $ */
+/* $NetBSD: profile.c,v 1.9 2018/06/06 17:19:49 kamil Exp $ */
/*
* CDDL HEADER START
@@ -434,7 +434,7 @@ profile_provide(void *arg, dtrace_probed
char *name, *suffix = NULL;
const struct {
- char *prefix;
+ const char *prefix;
int kind;
} types[] = {
{ PROF_PREFIX_PROFILE, PROF_PROFILE },
@@ -443,7 +443,7 @@ profile_provide(void *arg, dtrace_probed
};
const struct {
- char *name;
+ const char *name;
hrtime_t mult;
} suffixes[] = {
{ "ns", NANOSEC / NANOSEC },