Module Name: src
Committed By: christos
Date: Thu Jun 27 21:16:20 UTC 2013
Modified Files:
src/sys/arch/acorn26/acorn26: cpu.c
Log Message:
move assignment outside setjmp, because static analyzers are not smart enough
to know that it is impossible for id to be uninitialized.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/acorn26/acorn26/cpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/acorn26/acorn26/cpu.c
diff -u src/sys/arch/acorn26/acorn26/cpu.c:1.28 src/sys/arch/acorn26/acorn26/cpu.c:1.29
--- src/sys/arch/acorn26/acorn26/cpu.c:1.28 Sat Nov 21 15:32:13 2009
+++ src/sys/arch/acorn26/acorn26/cpu.c Thu Jun 27 17:16:20 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.28 2009/11/21 20:32:13 rmind Exp $ */
+/* $NetBSD: cpu.c,v 1.29 2013/06/27 21:16:20 christos Exp $ */
/*-
* Copyright (c) 2000, 2001 Ben Harris
@@ -32,7 +32,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.28 2009/11/21 20:32:13 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.29 2013/06/27 21:16:20 christos Exp $");
#include <sys/device.h>
#include <sys/proc.h>
@@ -147,14 +147,13 @@ static register_t
cpu_identify(void)
{
register_t dummy;
- volatile register_t id;
+ volatile register_t id = CPU_ID_ARM2;
void *cp_core, *cp15;
cp_core = install_coproc_handler(CORE_UNKNOWN_HANDLER,
cpu_undef_handler);
cp15 = install_coproc_handler(SYSTEM_COPROC, cpu_undef_handler);
if (setjmp(&undef_jmp) == 0) {
- id = CPU_ID_ARM2;
/* ARM250 and ARM3 support SWP. */
__asm volatile ("swp r0, r0, [%0]" : : "r" (&dummy) : "r0");
id = CPU_ID_ARM250;