Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ddb ddb: Cast pointer to uintptr_t, then to db_expr_t.
details: https://anonhg.NetBSD.org/src/rev/ba8ced882b6f
branches: trunk
changeset: 377453:ba8ced882b6f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 12 12:50:46 2023 +0000
description:
ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.
diffstat:
sys/ddb/db_syncobj.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 7a2f930c8809 -r ba8ced882b6f sys/ddb/db_syncobj.c
--- a/sys/ddb/db_syncobj.c Wed Jul 12 12:50:12 2023 +0000
+++ b/sys/ddb/db_syncobj.c Wed Jul 12 12:50:46 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_syncobj.c,v 1.1 2023/07/09 17:10:47 riastradh Exp $ */
+/* $NetBSD: db_syncobj.c,v 1.2 2023/07/12 12:50:46 riastradh Exp $ */
/*-
* Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
#define __RWLOCK_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_syncobj.c,v 1.1 2023/07/09 17:10:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_syncobj.c,v 1.2 2023/07/12 12:50:46 riastradh Exp $");
#include <sys/types.h>
@@ -48,7 +48,7 @@ db_syncobj_owner(struct syncobj *sobj, w
db_expr_t rw_syncobj_;
if (db_value_of_name("mutex_syncobj", &mutex_syncobj_) &&
- (db_expr_t)sobj == mutex_syncobj_) {
+ (db_expr_t)(uintptr_t)sobj == mutex_syncobj_) {
volatile const struct kmutex *mtx = wchan;
uintptr_t owner;
@@ -57,7 +57,7 @@ db_syncobj_owner(struct syncobj *sobj, w
return (struct lwp *)(owner & MUTEX_THREAD);
} else if (db_value_of_name("rw_syncobj", &rw_syncobj_) &&
- (db_expr_t)sobj == rw_syncobj_) {
+ (db_expr_t)(uintptr_t)sobj == rw_syncobj_) {
volatile const struct krwlock *rw = wchan;
uintptr_t owner;
Home |
Main Index |
Thread Index |
Old Index