Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/amd64 adjust some fallback code to be slightl...



details:   https://anonhg.NetBSD.org/src/rev/789272081736
branches:  trunk
changeset: 954598:789272081736
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Sep 07 00:47:27 2020 +0000

description:
adjust some fallback code to be slightly less ugly and avoid
upsetting GCC 9.

diffstat:

 sys/arch/amd64/amd64/machdep.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 40381267a935 -r 789272081736 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Mon Sep 07 00:46:38 2020 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Mon Sep 07 00:47:27 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.356 2020/07/14 00:45:52 yamaguchi Exp $  */
+/*     $NetBSD: machdep.c,v 1.357 2020/09/07 00:47:27 mrg Exp $        */
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.356 2020/07/14 00:45:52 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.357 2020/09/07 00:47:27 mrg Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -1518,9 +1518,12 @@
                tesym = (vaddr_t)symtab->esym + KERNBASE;
 #endif
                ksyms_addsyms_elf(symtab->nsym, (void *)tssym, (void *)tesym);
-       } else
-               ksyms_addsyms_elf(*(long *)(void *)&end,
-                   ((long *)(void *)&end) + 1, esym);
+       } else {
+               uintptr_t endp = (uintptr_t)(void *)&end;
+
+               ksyms_addsyms_elf(*(long *)endp,
+                   ((long *)endp) + 1, esym);
+       }
 #endif
 }
 #endif /* XENPV */



Home | Main Index | Thread Index | Old Index