Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/arch Follow the pattern from powerpc, make lint happy.



details:   https://anonhg.NetBSD.org/src/rev/0c1ce010b62b
branches:  trunk
changeset: 778325:0c1ce010b62b
user:      he <he%NetBSD.org@localhost>
date:      Thu Mar 22 09:32:04 2012 +0000

description:
Follow the pattern from powerpc, make lint happy.

diffstat:

 lib/libc/arch/arm/gen/_lwp.c |  10 +++++-----
 lib/libc/arch/sh3/gen/_lwp.c |   8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (79 lines):

diff -r 6aed952ab131 -r 0c1ce010b62b lib/libc/arch/arm/gen/_lwp.c
--- a/lib/libc/arch/arm/gen/_lwp.c      Thu Mar 22 08:56:52 2012 +0000
+++ b/lib/libc/arch/arm/gen/_lwp.c      Thu Mar 22 09:32:04 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $        */
+/*     $NetBSD: _lwp.c,v 1.8 2012/03/22 09:32:04 he Exp $      */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $");
+__RCSID("$NetBSD: _lwp.c,v 1.8 2012/03/22 09:32:04 he Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -50,7 +50,7 @@
 _lwp_makecontext(ucontext_t *u, void (*start)(void *),
     void *arg, void *private, caddr_t stack_base, size_t stack_size)
 {
-       void **sp;
+       uintptr_t sp;
 
        getcontext(u);
        u->uc_link = NULL;
@@ -58,13 +58,13 @@
        u->uc_stack.ss_sp = stack_base;
        u->uc_stack.ss_size = stack_size;
 
-       sp = (void *) (stack_base + stack_size);
+       sp = (uintptr_t)stack_base + stack_size;
        /*
         * Note: We make sure the stack is 8-byte aligned, here.
         */
 
        u->uc_mcontext.__gregs[_REG_R0] = (__greg_t)(uintptr_t)arg;
-       u->uc_mcontext.__gregs[_REG_SP] = ((__greg_t)(uintptr_t)sp) & ~7;
+       u->uc_mcontext.__gregs[_REG_SP] = ((__greg_t)sp) & ~7;
        u->uc_mcontext.__gregs[_REG_LR] = (__greg_t)(uintptr_t)_lwp_exit;
        u->uc_mcontext.__gregs[_REG_PC] = (__greg_t)(uintptr_t)start;
        u->uc_mcontext._mc_tlsbase = (__greg_t)(uintptr_t)private;
diff -r 6aed952ab131 -r 0c1ce010b62b lib/libc/arch/sh3/gen/_lwp.c
--- a/lib/libc/arch/sh3/gen/_lwp.c      Thu Mar 22 08:56:52 2012 +0000
+++ b/lib/libc/arch/sh3/gen/_lwp.c      Thu Mar 22 09:32:04 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:42 joerg Exp $   */
+/*     $NetBSD: _lwp.c,v 1.6 2012/03/22 09:32:04 he Exp $      */
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _lwp.c,v 1.5 2011/02/24 04:28:42 joerg Exp $");
+__RCSID("$NetBSD: _lwp.c,v 1.6 2012/03/22 09:32:04 he Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -50,7 +50,7 @@
 _lwp_makecontext(ucontext_t *u, void (*start)(void *),
     void *arg, void *private, caddr_t stack_base, size_t stack_size)
 {
-       void **sp;
+       uintptr_t sp;
 
        getcontext(u);
        u->uc_link = NULL;
@@ -58,7 +58,7 @@
        u->uc_stack.ss_sp = stack_base;
        u->uc_stack.ss_size = stack_size;
 
-       sp = (void **) (stack_base + stack_size);
+       sp = (uintptr_t)stack_base + stack_size;
 
        u->uc_mcontext.__gregs[_REG_R4] = (__greg_t) arg;
        u->uc_mcontext.__gregs[_REG_SP] = ((__greg_t) sp) & ~3;



Home | Main Index | Thread Index | Old Index