From d6ba279565aa135cfce8d622c3b82b7609eef31b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 7 Apr 1997 21:24:02 +0000 Subject: [PATCH] added initialization of variable to eliminate warning. --- c/src/exec/score/cpu/unix/cpu.c | 2 +- c/src/lib/libbsp/i960/cvme961/include/bsp.h | 2 +- cpukit/score/cpu/unix/cpu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/c/src/exec/score/cpu/unix/cpu.c b/c/src/exec/score/cpu/unix/cpu.c index 7a52c1b78b..ffa5a1385c 100644 --- a/c/src/exec/score/cpu/unix/cpu.c +++ b/c/src/exec/score/cpu/unix/cpu.c @@ -817,7 +817,7 @@ void _CPU_SHM_Init( char *shm_addr; key_t shm_key; key_t sem_key; - int status; + int status = 0; /* to avoid unitialized warnings */ int shm_size; if (getenv("RTEMS_SHM_KEY")) diff --git a/c/src/lib/libbsp/i960/cvme961/include/bsp.h b/c/src/lib/libbsp/i960/cvme961/include/bsp.h index 9b6caab59d..08fdbce174 100644 --- a/c/src/lib/libbsp/i960/cvme961/include/bsp.h +++ b/c/src/lib/libbsp/i960/cvme961/include/bsp.h @@ -62,7 +62,7 @@ extern "C" { #define delay( microseconds ) \ { register rtems_unsigned32 _delay=(microseconds); \ - register rtems_unsigned32 _tmp; \ + register rtems_unsigned32 _tmp = 0; /* initialized to avoid warning */ \ asm volatile( "0: \ remo 3,31,%0 ; \ cmpo 0,%0 ; \ diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c index 7a52c1b78b..ffa5a1385c 100644 --- a/cpukit/score/cpu/unix/cpu.c +++ b/cpukit/score/cpu/unix/cpu.c @@ -817,7 +817,7 @@ void _CPU_SHM_Init( char *shm_addr; key_t shm_key; key_t sem_key; - int status; + int status = 0; /* to avoid unitialized warnings */ int shm_size; if (getenv("RTEMS_SHM_KEY"))