Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/dist/cmd/dtrace Correct compilation of o...



details:   https://anonhg.NetBSD.org/src/rev/ae7e0092037f
branches:  trunk
changeset: 323263:ae7e0092037f
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Jun 06 14:46:58 2018 +0000

description:
Correct compilation of osnet/dist/cmd/dtrace/dtrace.c under Clang

Add missing const keywords.

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/dist/cmd/dtrace/dtrace.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 8ba74b7976c4 -r ae7e0092037f external/cddl/osnet/dist/cmd/dtrace/dtrace.c
--- a/external/cddl/osnet/dist/cmd/dtrace/dtrace.c      Wed Jun 06 14:31:45 2018 +0000
+++ b/external/cddl/osnet/dist/cmd/dtrace/dtrace.c      Wed Jun 06 14:46:58 2018 +0000
@@ -555,7 +555,7 @@
 print_probe_info(const dtrace_probeinfo_t *p)
 {
        char buf[BUFSIZ];
-       char *user;
+       const char *user;
        int i;
 
        oprintf("\n\tProbe Description Attributes\n");
@@ -1164,8 +1164,8 @@
        int i;
 
        struct {
-               char *name;
-               char *optname;
+               const char *name;
+               const char *optname;
                dtrace_optval_t val;
        } bufs[] = {
                { "buffer size", "bufsize" },
@@ -1221,7 +1221,7 @@
 
        for (i = 0; rates[i].name != NULL; i++) {
                dtrace_optval_t nval;
-               char *dir;
+               const char *dir;
 
                if (rates[i].val == DTRACEOPT_UNSET)
                        continue;



Home | Main Index | Thread Index | Old Index