From: jsg Date: Fri, 26 Nov 2021 14:59:42 +0000 (+0000) Subject: avoid clang -Wsometimes-uninitialized warning when DDB is not defined X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7a1c721588c771bfdd6d55a07468a39ce3923542;p=openbsd avoid clang -Wsometimes-uninitialized warning when DDB is not defined ok kettenis@ visa@ --- diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index 3a8be7f3bc6..eee4b367bb5 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.121 2021/05/20 12:34:35 bluhm Exp $ */ +/* $OpenBSD: trap.c,v 1.122 2021/11/26 14:59:42 jsg Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -461,13 +461,14 @@ brain_damage: /* set up registers */ db_save_regs(frame); db_find_sym_and_offset(frame->srr0, &name, &offset); -#else - name = NULL; -#endif if (!name) { name = "0"; offset = frame->srr0; } +#else + name = "0"; + offset = frame->srr0; +#endif panic("trap type %x srr1 %x at %x (%s+0x%lx) lr %lx", type, frame->srr1, frame->srr0, name, offset, frame->lr);