Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dev/profile Correct compilation of osnet...



details:   https://anonhg.NetBSD.org/src/rev/481261dcff8f
branches:  trunk
changeset: 319669:481261dcff8f
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Jun 06 17:19:49 2018 +0000

description:
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>

diffstat:

 external/cddl/osnet/dev/profile/profile.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 53c7cfebf863 -r 481261dcff8f external/cddl/osnet/dev/profile/profile.c
--- a/external/cddl/osnet/dev/profile/profile.c Wed Jun 06 17:17:31 2018 +0000
+++ b/external/cddl/osnet/dev/profile/profile.c Wed Jun 06 17:19:49 2018 +0000
@@ -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 @@
        char *name, *suffix = NULL;
 
        const struct {
-               char *prefix;
+               const char *prefix;
                int kind;
        } types[] = {
                { PROF_PREFIX_PROFILE, PROF_PROFILE },
@@ -443,7 +443,7 @@
        };
 
        const struct {
-               char *name;
+               const char *name;
                hrtime_t mult;
        } suffixes[] = {
                { "ns",         NANOSEC / NANOSEC },



Home | Main Index | Thread Index | Old Index