summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-11-04 23:00:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-11-04 23:00:04 +0000
commit112365808642f0eeb2d2a8a156e5d6e64cd92067 (patch)
treef13d18e526a254bd6497878bf755db0d8258e0c0 /cpukit
parent2010-11-04 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-112365808642f0eeb2d2a8a156e5d6e64cd92067.tar.bz2
2010-11-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/stackchk/check.c: Make compile again. * sapi/src/io.c, score/src/heap.c: Address dead assignment issues found by clang.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/libmisc/stackchk/check.c7
-rw-r--r--cpukit/sapi/src/io.c1
-rw-r--r--cpukit/score/src/heap.c1
4 files changed, 9 insertions, 6 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 1333e1b26e..d55bb98d56 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,11 @@
2010-11-04 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * libmisc/stackchk/check.c: Make compile again.
+ * sapi/src/io.c, score/src/heap.c: Address dead assignment
+ issues found by clang.
+
+2010-11-04 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* libmisc/stackchk/check.c: Address casting issue highlighted by clang.
There was no need for an intermediate cast to a structure pointer.
diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c
index d8783ca96a..d2c0b1001b 100644
--- a/cpukit/libmisc/stackchk/check.c
+++ b/cpukit/libmisc/stackchk/check.c
@@ -81,7 +81,7 @@ static inline bool Stack_check_Frame_pointer_in_range(
#if (CPU_STACK_GROWS_UP == TRUE)
#define Stack_check_Get_pattern( _the_stack ) \
((char *)(_the_stack)->area + \
- (_the_stack)->size - sizeof( Stack_check_Control ) ))
+ (_the_stack)->size - sizeof( Stack_check_Control ) )
#define Stack_check_Calculate_used( _low, _size, _high_water ) \
((char *)(_high_water) - (char *)(_low))
@@ -97,8 +97,7 @@ static inline bool Stack_check_Frame_pointer_in_range(
* for the free list into this area.
*/
#define Stack_check_Get_pattern( _the_stack ) \
- ((char *)(_the_stack)->area \
- + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE))
+ ((char *)(_the_stack)->area + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE)
#define Stack_check_Calculate_used( _low, _size, _high_water) \
( ((char *)(_low) + (_size)) - (char *)(_high_water) )
@@ -112,7 +111,7 @@ static inline bool Stack_check_Frame_pointer_in_range(
* Obtain a properly typed pointer to the area to check.
*/
#define Stack_check_Get_pattern_area( _the_stack ) \
- ((Stack_check_Control *) Stack_check_Get_pattern( _the_stack )
+ (Stack_check_Control *) Stack_check_Get_pattern( _the_stack )
/*
* The assumption is that if the pattern gets overwritten, the task
diff --git a/cpukit/sapi/src/io.c b/cpukit/sapi/src/io.c
index 65cb43d568..6a752cd527 100644
--- a/cpukit/sapi/src/io.c
+++ b/cpukit/sapi/src/io.c
@@ -80,7 +80,6 @@ void _IO_Manager_initialization(void)
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
- number_of_drivers = drivers_in_table;
}
/*
diff --git a/cpukit/score/src/heap.c b/cpukit/score/src/heap.c
index afde241931..b972d84c3c 100644
--- a/cpukit/score/src/heap.c
+++ b/cpukit/score/src/heap.c
@@ -416,7 +416,6 @@ static Heap_Block *_Heap_Block_allocate_from_end(
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
- block_begin = (uintptr_t) block;
block_size += prev_block_size;
}