Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/m68k/include pass a pointer conversion via uintptr_...



details:   https://anonhg.NetBSD.org/src/rev/4984b3c6dfc7
branches:  trunk
changeset: 954589:4984b3c6dfc7
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Sep 07 00:32:00 2020 +0000

description:
pass a pointer conversion via uintptr_t *and* the desired type casts.
avoids new GCC 9 warnings with C++ code.

diffstat:

 sys/arch/m68k/include/mcontext.h |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r f1ca3083451c -r 4984b3c6dfc7 sys/arch/m68k/include/mcontext.h
--- a/sys/arch/m68k/include/mcontext.h  Mon Sep 07 00:31:11 2020 +0000
+++ b/sys/arch/m68k/include/mcontext.h  Mon Sep 07 00:32:00 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcontext.h,v 1.10 2018/02/15 15:53:56 kamil Exp $      */
+/*     $NetBSD: mcontext.h,v 1.11 2020/09/07 00:32:00 mrg Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -126,7 +126,8 @@
 __lwp_gettcb_fast(void)
 {
        unsigned int __tcb = (unsigned int)_lwp_getprivate();
-       return (void *)(__tcb - TLS_TP_OFFSET - sizeof(struct tls_tcb));
+       return (struct tls_tcb *)(uintptr_t)
+           (__tcb - TLS_TP_OFFSET - sizeof(struct tls_tcb));
 }
 
 static inline void



Home | Main Index | Thread Index | Old Index