<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-11-04)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>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.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2640&r2=text&tr2=1.2641&diff_format=h">M</a></td><td width='1%'>1.2641</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stackchk/check.c.diff?r1=text&tr1=1.72&r2=text&tr2=1.73&diff_format=h">M</a></td><td width='1%'>1.73</td><td width='100%'>cpukit/libmisc/stackchk/check.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2640 rtems/cpukit/ChangeLog:1.2641
--- rtems/cpukit/ChangeLog:1.2640       Mon Nov  1 12:32:52 2010
+++ rtems/cpukit/ChangeLog      Thu Nov  4 17:22:48 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+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.
+
</font> 2010-11-01        Alin Rus <alin.codejunkie@gmail.com>
 
        * posix/include/rtems/posix/aio_misc.h, posix/src/aio_misc.c: Small

<font color='#006600'>diff -u rtems/cpukit/libmisc/stackchk/check.c:1.72 rtems/cpukit/libmisc/stackchk/check.c:1.73
--- rtems/cpukit/libmisc/stackchk/check.c:1.72  Wed Aug 25 15:29:41 2010
+++ rtems/cpukit/libmisc/stackchk/check.c       Thu Nov  4 17:22:49 2010
</font><font color='#997700'>@@ -79,8 +79,8 @@
</font>  *  whether the stack grow to the high or low area of the memory.
  */
 #if (CPU_STACK_GROWS_UP == TRUE)
<font color='#880000'>-  #define Stack_check_Get_pattern_area( _the_stack ) \
-    ((Stack_check_Control *) ((char *)(_the_stack)->area + \
</font><font color='#000088'>+  #define Stack_check_Get_pattern( _the_stack ) \
+    ((char *)(_the_stack)->area + \
</font>          (_the_stack)->size - sizeof( Stack_check_Control ) ))
 
   #define Stack_check_Calculate_used( _low, _size, _high_water ) \
<font color='#997700'>@@ -96,8 +96,8 @@
</font>    * The task stack free operation will write the next and previous pointers
    * for the free list into this area.
    */
<font color='#880000'>-  #define Stack_check_Get_pattern_area( _the_stack ) \
-    ((Stack_check_Control *) ((char *)(_the_stack)->area \
</font><font color='#000088'>+  #define Stack_check_Get_pattern( _the_stack ) \
+    ((char *)(_the_stack)->area \
</font>       + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE))
 
   #define Stack_check_Calculate_used( _low, _size, _high_water) \
<font color='#997700'>@@ -109,6 +109,12 @@
</font> #endif
 
 /*
<font color='#000088'>+ *  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 )
+
+/*
</font>  *  The assumption is that if the pattern gets overwritten, the task
  *  is too close.  This defines the usable stack memory.
  */
<font color='#997700'>@@ -219,8 +225,8 @@
</font> void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
 {
   Stack_Control *stack = &running->Start.Initial_stack;
<font color='#880000'>-  void *pattern_area = Stack_check_Get_pattern_area(stack);
-  char name [32];
</font><font color='#000088'>+  void          *pattern_area = Stack_check_Get_pattern(stack);
+  char           name[32];
</font> 
   printk("BLOWN STACK!!!\n");
   printk("task control block: 0x%08" PRIxPTR "\n", running);
<font color='#997700'>@@ -270,10 +276,10 @@
</font> {
   Stack_Control *the_stack = &running->Start.Initial_stack;
   void          *pattern;
<font color='#880000'>-  bool        sp_ok;
-  bool        pattern_ok = true;
</font><font color='#000088'>+  bool           sp_ok;
+  bool           pattern_ok = true;
</font> 
<font color='#880000'>-  pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
</font><font color='#000088'>+  pattern = Stack_check_Get_pattern_area(the_stack);
</font> 
   /*
    *  Check for an out of bounds stack pointer or an overwrite
<font color='#997700'>@@ -309,7 +315,7 @@
</font>    */
   if ( Stack_check_Initialized ) {
     pattern_ok = (!memcmp(
<font color='#880000'>-      (void *) Stack_check_Get_pattern_area(the_stack)->pattern,
</font><font color='#000088'>+      Stack_check_Get_pattern(the_stack),
</font>       (void *) Stack_check_Pattern.pattern,
       PATTERN_SIZE_BYTES
     ));
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>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.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2641&r2=text&tr2=1.2642&diff_format=h">M</a></td><td width='1%'>1.2642</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stackchk/check.c.diff?r1=text&tr1=1.73&r2=text&tr2=1.74&diff_format=h">M</a></td><td width='1%'>1.74</td><td width='100%'>cpukit/libmisc/stackchk/check.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/src/io.c.diff?r1=text&tr1=1.31&r2=text&tr2=1.32&diff_format=h">M</a></td><td width='1%'>1.32</td><td width='100%'>cpukit/sapi/src/io.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/heap.c.diff?r1=text&tr1=1.39&r2=text&tr2=1.40&diff_format=h">M</a></td><td width='1%'>1.40</td><td width='100%'>cpukit/score/src/heap.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2641 rtems/cpukit/ChangeLog:1.2642
--- rtems/cpukit/ChangeLog:1.2641       Thu Nov  4 17:22:48 2010
+++ rtems/cpukit/ChangeLog      Thu Nov  4 18:00:04 2010
</font><font color='#997700'>@@ -1,5 +1,11 @@
</font> 2010-11-04        Joel Sherrill <joel.sherrill@oarcorp.com>
 
<font color='#000088'>+   * 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>
+
</font>   * libmisc/stackchk/check.c: Address casting issue highlighted by clang.
        There was no need for an intermediate cast to a structure pointer.
 

<font color='#006600'>diff -u rtems/cpukit/libmisc/stackchk/check.c:1.73 rtems/cpukit/libmisc/stackchk/check.c:1.74
--- rtems/cpukit/libmisc/stackchk/check.c:1.73  Thu Nov  4 17:22:49 2010
+++ rtems/cpukit/libmisc/stackchk/check.c       Thu Nov  4 18:00:04 2010
</font><font color='#997700'>@@ -81,7 +81,7 @@
</font> #if (CPU_STACK_GROWS_UP == TRUE)
   #define Stack_check_Get_pattern( _the_stack ) \
     ((char *)(_the_stack)->area + \
<font color='#880000'>-         (_the_stack)->size - sizeof( Stack_check_Control ) ))
</font><font color='#000088'>+         (_the_stack)->size - sizeof( Stack_check_Control ) )
</font> 
   #define Stack_check_Calculate_used( _low, _size, _high_water ) \
       ((char *)(_high_water) - (char *)(_low))
<font color='#997700'>@@ -97,8 +97,7 @@
</font>    * for the free list into this area.
    */
   #define Stack_check_Get_pattern( _the_stack ) \
<font color='#880000'>-    ((char *)(_the_stack)->area \
-      + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE))
</font><font color='#000088'>+    ((char *)(_the_stack)->area + sizeof(Heap_Block) - HEAP_BLOCK_HEADER_SIZE)
</font> 
   #define Stack_check_Calculate_used( _low, _size, _high_water) \
       ( ((char *)(_low) + (_size)) - (char *)(_high_water) )
<font color='#997700'>@@ -112,7 +111,7 @@
</font>  *  Obtain a properly typed pointer to the area to check.
  */
 #define Stack_check_Get_pattern_area( _the_stack ) \
<font color='#880000'>-  ((Stack_check_Control *) Stack_check_Get_pattern( _the_stack )
</font><font color='#000088'>+  (Stack_check_Control *) Stack_check_Get_pattern( _the_stack )
</font> 
 /*
  *  The assumption is that if the pattern gets overwritten, the task

<font color='#006600'>diff -u rtems/cpukit/sapi/src/io.c:1.31 rtems/cpukit/sapi/src/io.c:1.32
--- rtems/cpukit/sapi/src/io.c:1.31     Sun Nov 29 07:51:52 2009
+++ rtems/cpukit/sapi/src/io.c  Thu Nov  4 18:00:04 2010
</font><font color='#997700'>@@ -80,7 +80,6 @@
</font> 
   for ( index = 0 ; index < drivers_in_table ; index++ )
     _IO_Driver_address_table[index] = driver_table[index];
<font color='#880000'>-  number_of_drivers = drivers_in_table;
</font> }
 
 /*

<font color='#006600'>diff -u rtems/cpukit/score/src/heap.c:1.39 rtems/cpukit/score/src/heap.c:1.40
--- rtems/cpukit/score/src/heap.c:1.39  Wed Aug 25 07:35:52 2010
+++ rtems/cpukit/score/src/heap.c       Thu Nov  4 18:00:04 2010
</font><font color='#997700'>@@ -416,7 +416,6 @@
</font>     uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
 
     block = prev_block;
<font color='#880000'>-    block_begin = (uintptr_t) block;
</font>     block_size += prev_block_size;
   }
 
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>