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>
This commit is contained in:
parent
b36fa7c860
commit
3982d87926
6
external/cddl/osnet/dev/profile/profile.c
vendored
6
external/cddl/osnet/dev/profile/profile.c
vendored
@ -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_probedesc_t *desc)
|
||||
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_probedesc_t *desc)
|
||||
};
|
||||
|
||||
const struct {
|
||||
char *name;
|
||||
const char *name;
|
||||
hrtime_t mult;
|
||||
} suffixes[] = {
|
||||
{ "ns", NANOSEC / NANOSEC },
|
||||
|
Loading…
Reference in New Issue
Block a user