Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Fix subr_kcov build on NetBSD/i386



details:   https://anonhg.NetBSD.org/src/rev/78a271777a2c
branches:  trunk
changeset: 449121:78a271777a2c
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat Feb 23 12:03:07 2019 +0000

description:
Fix subr_kcov build on NetBSD/i386

Cast the pointer returned from __builtin_return_address() to intptr_t
before converting it to uint64_t.

diffstat:

 sys/kern/subr_kcov.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 52f93ed22091 -r 78a271777a2c sys/kern/subr_kcov.c
--- a/sys/kern/subr_kcov.c      Sat Feb 23 11:57:41 2019 +0000
+++ b/sys/kern/subr_kcov.c      Sat Feb 23 12:03:07 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_kcov.c,v 1.1 2019/02/23 03:10:06 kamil Exp $      */
+/*     $NetBSD: subr_kcov.c,v 1.2 2019/02/23 12:03:07 kamil Exp $      */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -292,7 +292,7 @@
 
        idx = kd->buf[0];
        if (idx < kd->bufnent) {
-               kd->buf[idx+1] = (kcov_int_t)__builtin_return_address(0);
+               kd->buf[idx+1] = (intptr_t)__builtin_return_address(0);
                kd->buf[0]++;
        }
 }



Home | Main Index | Thread Index | Old Index