Module Name:    src
Committed By:   he
Date:           Thu Mar 22 09:32:04 UTC 2012

Modified Files:
        src/lib/libc/arch/arm/gen: _lwp.c
        src/lib/libc/arch/sh3/gen: _lwp.c

Log Message:
Follow the pattern from powerpc, make lint happy.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/arm/gen/_lwp.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/sh3/gen/_lwp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/arm/gen/_lwp.c
diff -u src/lib/libc/arch/arm/gen/_lwp.c:1.7 src/lib/libc/arch/arm/gen/_lwp.c:1.8
--- src/lib/libc/arch/arm/gen/_lwp.c:1.7	Wed Mar 21 14:03:06 2012
+++ src/lib/libc/arch/arm/gen/_lwp.c	Thu Mar 22 09:32:04 2012
@@ -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 @@ void
 _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 @@ _lwp_makecontext(ucontext_t *u, void (*s
 	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;

Index: src/lib/libc/arch/sh3/gen/_lwp.c
diff -u src/lib/libc/arch/sh3/gen/_lwp.c:1.5 src/lib/libc/arch/sh3/gen/_lwp.c:1.6
--- src/lib/libc/arch/sh3/gen/_lwp.c:1.5	Thu Feb 24 04:28:42 2011
+++ src/lib/libc/arch/sh3/gen/_lwp.c	Thu Mar 22 09:32:04 2012
@@ -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 @@ void
 _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 @@ _lwp_makecontext(ucontext_t *u, void (*s
 	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;

Reply via email to