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/8813cdd3c0ca
branches:  trunk
changeset: 954963:8813cdd3c0ca
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 475f7aa09d92 -r 8813cdd3c0ca 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