Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/include cast to register_t because not all 's...



details:   https://anonhg.NetBSD.org/src/rev/6a1897642ab0
branches:  trunk
changeset: 819289:6a1897642ab0
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Nov 25 14:10:31 2016 +0000

description:
cast to register_t because not all 'struct reg' members are the right type.

diffstat:

 sys/arch/sparc/include/ptrace.h |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (26 lines):

diff -r e796444c04d9 -r 6a1897642ab0 sys/arch/sparc/include/ptrace.h
--- a/sys/arch/sparc/include/ptrace.h   Fri Nov 25 13:33:24 2016 +0000
+++ b/sys/arch/sparc/include/ptrace.h   Fri Nov 25 14:10:31 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptrace.h,v 1.9 2015/09/25 16:05:17 christos Exp $ */
+/*     $NetBSD: ptrace.h,v 1.10 2016/11/25 14:10:31 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -55,13 +55,13 @@
        "PT_SETFPREGS",
 
 #include <machine/reg.h>
-#define PTRACE_REG_PC(r)       (r)->r_pc
+#define PTRACE_REG_PC(r)       ((register_t)(r)->r_pc)
 #define PTRACE_REG_SET_PC(r, v)        do {    \
        (r)->r_pc = (v);                \
        (r)->r_npc = (v) + 4;           \
     } while (/*CONSTCOND*/0)
-#define PTRACE_REG_SP(r)       (r)->r_out[6]
-#define PTRACE_REG_INTRV(r)    (r)->r_out[0]
+#define PTRACE_REG_SP(r)       ((register_t)(r)->r_out[6])
+#define PTRACE_REG_INTRV(r)    ((register_t)(r)->r_out[0])
 
 #define PTRACE_BREAKPOINT      ((const uint8_t[]) { 0x91, 0xd0, 0x20, 0x01 })
 #define PTRACE_BREAKPOINT_SIZE 4



Home | Main Index | Thread Index | Old Index