Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh3/include apply some parens to make macros safe. ...



details:   https://anonhg.NetBSD.org/src/rev/03fcdac0e9d2
branches:  trunk
changeset: 1014222:03fcdac0e9d2
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Sep 14 05:04:05 2020 +0000

description:
apply some parens to make macros safe.  fixes GCC 9 sanitizer issues.

diffstat:

 sys/arch/sh3/include/ptrace.h |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (26 lines):

diff -r e1973394cfed -r 03fcdac0e9d2 sys/arch/sh3/include/ptrace.h
--- a/sys/arch/sh3/include/ptrace.h     Mon Sep 14 04:57:20 2020 +0000
+++ b/sys/arch/sh3/include/ptrace.h     Mon Sep 14 05:04:05 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptrace.h,v 1.17 2019/12/24 14:50:59 kamil Exp $        */
+/*     $NetBSD: ptrace.h,v 1.18 2020/09/14 05:04:05 mrg Exp $  */
 
 /*
  * Copyright (c) 1993 Christopher G. Demetriou
@@ -66,11 +66,11 @@
        "PT_CLEARSTEP"
 
 #include <machine/reg.h>
-#define PTRACE_REG_PC(r)       r->r_spc
-#define PTRACE_REG_FP(r)       r->r_r14
-#define PTRACE_REG_SET_PC(r, v)        r->r_spc = (v)
-#define PTRACE_REG_SP(r)       r->r_r15
-#define PTRACE_REG_INTV(r)     r->r_r0
+#define PTRACE_REG_PC(r)       (r)->r_spc
+#define PTRACE_REG_FP(r)       (r)->r_r14
+#define PTRACE_REG_SET_PC(r, v)        (r)->r_spc = (v)
+#define PTRACE_REG_SP(r)       (r)->r_r15
+#define PTRACE_REG_INTV(r)     (r)->r_r0
 
 #define PTRACE_ILLEGAL_ASM     __asm __volatile ("0: bra 0b; bra 0b" : : : "memory")
 



Home | Main Index | Thread Index | Old Index