<!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-08-23)</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-08-23 Joel Sherrill <joel.sherrill@oarcorp.com>

        CID 99
        CID 100
        CID 101
        CID 102
        * libfs/src/dosfs/fat_file.c, libfs/src/dosfs/msdos.h,
        libfs/src/dosfs/msdos_misc.c: Resolve invalid use of const identified
        by Coverity scanner.
</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.2579&r2=text&tr2=1.2580&diff_format=h">M</a></td><td width='1%'>1.2580</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/fat_file.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>cpukit/libfs/src/dosfs/fat_file.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/msdos.h.diff?r1=text&tr1=1.25&r2=text&tr2=1.26&diff_format=h">M</a></td><td width='1%'>1.26</td><td width='100%'>cpukit/libfs/src/dosfs/msdos.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/dosfs/msdos_misc.c.diff?r1=text&tr1=1.23&r2=text&tr2=1.24&diff_format=h">M</a></td><td width='1%'>1.24</td><td width='100%'>cpukit/libfs/src/dosfs/msdos_misc.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2579 rtems/cpukit/ChangeLog:1.2580
--- rtems/cpukit/ChangeLog:1.2579       Mon Aug 23 11:10:53 2010
+++ rtems/cpukit/ChangeLog      Mon Aug 23 16:29:31 2010
</font><font color='#997700'>@@ -1,3 +1,13 @@
</font><font color='#000088'>+2010-08-23    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       CID 99
+       CID 100
+       CID 101
+       CID 102
+       * libfs/src/dosfs/fat_file.c, libfs/src/dosfs/msdos.h,
+       libfs/src/dosfs/msdos_misc.c: Resolve invalid use of const identified
+       by Coverity scanner.
+
</font> 2010-08-23        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        PR 1673/cpukit

<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/fat_file.c:1.15 rtems/cpukit/libfs/src/dosfs/fat_file.c:1.16
--- rtems/cpukit/libfs/src/dosfs/fat_file.c:1.15        Sun Nov 29 07:18:56 2009
+++ rtems/cpukit/libfs/src/dosfs/fat_file.c     Mon Aug 23 16:29:31 2010
</font><font color='#997700'>@@ -691,22 +691,25 @@
</font>             ret = va_arg(ap, uint32_t   *);
 
             /* sanity check */
<font color='#880000'>-            if ( pos >= fat_fd->fat_file_size )
</font><font color='#000088'>+            if ( pos >= fat_fd->fat_file_size ) {
+                va_end();
</font>                 rtems_set_errno_and_return_minus_one( EIO );
<font color='#000088'>+            }
</font> 
             if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
                 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
             {
                 /* cluster 0 (zero) reserved for root dir */
                 *ret  = 0;
<font color='#880000'>-                return RC_OK;
</font><font color='#000088'>+                rc = RC_OK;
+                break;
</font>             }
 
             cl_start = pos >> fs_info->vol.bpc_log2;
 
             rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
             if ( rc != RC_OK )
<font color='#880000'>-                return rc;
</font><font color='#000088'>+                break;
</font> 
             *ret = cur_cln;
             break;
<font color='#997700'>@@ -716,6 +719,7 @@
</font>             rc = -1;
             break;
     }
<font color='#000088'>+    va_end(ap);
</font>     return rc;
 }
 

<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/msdos.h:1.25 rtems/cpukit/libfs/src/dosfs/msdos.h:1.26
--- rtems/cpukit/libfs/src/dosfs/msdos.h:1.25   Thu Jul 15 02:36:37 2010
+++ rtems/cpukit/libfs/src/dosfs/msdos.h        Mon Aug 23 16:29:31 2010
</font><font color='#997700'>@@ -179,8 +179,8 @@
</font> #define MSDOS_NAME_MAX_LFN_WITH_DOT      (260)
 
 
<font color='#880000'>-extern const char const* MSDOS_DOT_NAME;    /* ".", padded to MSDOS_NAME chars */
-extern const char const* MSDOS_DOTDOT_NAME; /* ".", padded to MSDOS_NAME chars */
</font><font color='#000088'>+extern const char *const MSDOS_DOT_NAME;    /* ".", padded to MSDOS_NAME chars */
+extern const char *const MSDOS_DOTDOT_NAME; /* ".", padded to MSDOS_NAME chars */
</font> 
 typedef enum msdos_name_types_e
 {

<font color='#006600'>diff -u rtems/cpukit/libfs/src/dosfs/msdos_misc.c:1.23 rtems/cpukit/libfs/src/dosfs/msdos_misc.c:1.24
--- rtems/cpukit/libfs/src/dosfs/msdos_misc.c:1.23      Tue Mar 30 06:16:29 2010
+++ rtems/cpukit/libfs/src/dosfs/msdos_misc.c   Mon Aug 23 16:29:31 2010
</font><font color='#997700'>@@ -40,8 +40,8 @@
</font> /*
  * External strings. Saves spave this way.
  */
<font color='#880000'>-const char const* MSDOS_DOT_NAME    = ".          ";
-const char const* MSDOS_DOTDOT_NAME = "..         ";
</font><font color='#000088'>+const char *const MSDOS_DOT_NAME    = ".          ";
+const char *const MSDOS_DOTDOT_NAME = "..         ";
</font> 
 /* msdos_is_valid_name_char --
  *     Routine to check the character in a file or directory name.
</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-08-23 Joel Sherrill <joel.sherrill@oarcorp.com>


        CID 79/DEADCODE
        CID 78/DEADCODE
        CID 77/DEADCODE
        CID 76/DEADCODE
        * posix/src/condtimedwait.c, posix/src/mutextimedlock.c,
        posix/src/prwlocktimedrdlock.c, posix/src/prwlocktimedwrlock.c,
        posix/src/semtimedwait.c: Resolve various dead code issues identified
        by Coverity scanner.
</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.2580&r2=text&tr2=1.2581&diff_format=h">M</a></td><td width='1%'>1.2581</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/condtimedwait.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>cpukit/posix/src/condtimedwait.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/mutextimedlock.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>cpukit/posix/src/mutextimedlock.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/prwlocktimedrdlock.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>cpukit/posix/src/prwlocktimedrdlock.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/prwlocktimedwrlock.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>cpukit/posix/src/prwlocktimedwrlock.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/semtimedwait.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>cpukit/posix/src/semtimedwait.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2580 rtems/cpukit/ChangeLog:1.2581
--- rtems/cpukit/ChangeLog:1.2580       Mon Aug 23 16:29:31 2010
+++ rtems/cpukit/ChangeLog      Mon Aug 23 16:31:26 2010
</font><font color='#997700'>@@ -1,5 +1,17 @@
</font> 2010-08-23        Joel Sherrill <joel.sherrill@oarcorp.com>
 
<font color='#000088'>+
+       CID 79/DEADCODE
+       CID 78/DEADCODE
+       CID 77/DEADCODE
+       CID 76/DEADCODE
+       * posix/src/condtimedwait.c, posix/src/mutextimedlock.c,
+       posix/src/prwlocktimedrdlock.c, posix/src/prwlocktimedwrlock.c,
+       posix/src/semtimedwait.c: Resolve various dead code issues identified
+       by Coverity scanner.
+
+2010-08-23     Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font>   CID 99
        CID 100
        CID 101

<font color='#006600'>diff -u rtems/cpukit/posix/src/condtimedwait.c:1.8 rtems/cpukit/posix/src/condtimedwait.c:1.9
--- rtems/cpukit/posix/src/condtimedwait.c:1.8  Sun May  3 18:10:02 2009
+++ rtems/cpukit/posix/src/condtimedwait.c      Mon Aug 23 16:31:27 2010
</font><font color='#997700'>@@ -39,8 +39,9 @@
</font>   const struct timespec *abstime
 )
 {
<font color='#880000'>-  Watchdog_Interval ticks;
-  bool              already_timedout;
</font><font color='#000088'>+  Watchdog_Interval                            ticks;
+  bool                                         already_timedout;
+  POSIX_Absolute_timeout_conversion_results_t  status;
</font> 
   /*
    *  POSIX requires that blocking calls with timeouts that take
<font color='#997700'>@@ -51,18 +52,14 @@
</font>    *  then we do a polling operation and convert the UNSATISFIED
    *  status into the appropriate error.
    */
<font color='#880000'>-  switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) {
-    case POSIX_ABSOLUTE_TIMEOUT_INVALID:
-      return EINVAL;
-    case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
-    case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
-      already_timedout = true;
-      break;
-    case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
-    default:  /* only to silence warnings */
-      already_timedout = false;
-      break;
-  }
</font><font color='#000088'>+  already_timedout = false;
+  status = _POSIX_Absolute_timeout_to_ticks(abstime, &ticks);
+  if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
+    return EINVAL;
+
+  if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
+       status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
+    already_timedout = true;
</font> 
   return _POSIX_Condition_variables_Wait_support(
     cond,

<font color='#006600'>diff -u rtems/cpukit/posix/src/mutextimedlock.c:1.11 rtems/cpukit/posix/src/mutextimedlock.c:1.12
--- rtems/cpukit/posix/src/mutextimedlock.c:1.11        Mon Nov 30 09:44:21 2009
+++ rtems/cpukit/posix/src/mutextimedlock.c     Mon Aug 23 16:31:27 2010
</font><font color='#997700'>@@ -72,15 +72,11 @@
</font>    *  make sure the right reason is returned.
    */
   if ( !do_wait && (lock_status == EBUSY) ) {
<font color='#880000'>-    switch (lock_status) {
-      case POSIX_ABSOLUTE_TIMEOUT_INVALID:
-        return EINVAL;
-      case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
-      case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
-        return ETIMEDOUT;
-      case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
-        break;
-    }
</font><font color='#000088'>+    if ( lock_status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
+      return EINVAL;
+    if ( lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
+         lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
+      return ETIMEDOUT;
</font>   }
 
   return lock_status;

<font color='#006600'>diff -u rtems/cpukit/posix/src/prwlocktimedrdlock.c:1.11 rtems/cpukit/posix/src/prwlocktimedrdlock.c:1.12
--- rtems/cpukit/posix/src/prwlocktimedrdlock.c:1.11    Mon Nov 30 09:44:21 2009
+++ rtems/cpukit/posix/src/prwlocktimedrdlock.c Mon Aug 23 16:31:27 2010
</font><font color='#997700'>@@ -82,15 +82,11 @@
</font>       _Thread_Enable_dispatch();
       if ( !do_wait ) {
         if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
<font color='#880000'>-     switch (status) {
-           case POSIX_ABSOLUTE_TIMEOUT_INVALID:
-             return EINVAL;
-           case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
-           case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
-             return ETIMEDOUT;
-           case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
-             break;
-         }
</font><font color='#000088'>+        if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
+           return EINVAL;
+         if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
+              status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
+           return ETIMEDOUT;
</font>         }
       }
 

<font color='#006600'>diff -u rtems/cpukit/posix/src/prwlocktimedwrlock.c:1.10 rtems/cpukit/posix/src/prwlocktimedwrlock.c:1.11
--- rtems/cpukit/posix/src/prwlocktimedwrlock.c:1.10    Mon Nov 30 09:44:21 2009
+++ rtems/cpukit/posix/src/prwlocktimedwrlock.c Mon Aug 23 16:31:27 2010
</font><font color='#997700'>@@ -82,15 +82,11 @@
</font>       _Thread_Enable_dispatch();
       if ( !do_wait &&
            (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
<font color='#880000'>-   switch (status) {
-         case POSIX_ABSOLUTE_TIMEOUT_INVALID:
-           return EINVAL;
-         case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
-         case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
-           return ETIMEDOUT;
-         case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
-           break;
-       }
</font><font color='#000088'>+      if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
+         return EINVAL;
+       if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
+            status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
+         return ETIMEDOUT;
</font>       }
 
       return _POSIX_RWLock_Translate_core_RWLock_return_code(

<font color='#006600'>diff -u rtems/cpukit/posix/src/semtimedwait.c:1.14 rtems/cpukit/posix/src/semtimedwait.c:1.15
--- rtems/cpukit/posix/src/semtimedwait.c:1.14  Mon Jun 21 11:38:26 2010
+++ rtems/cpukit/posix/src/semtimedwait.c       Mon Aug 23 16:31:27 2010
</font><font color='#997700'>@@ -70,15 +70,11 @@
</font>    *  make sure the right reason is returned.
    */
   if ( !do_wait && (lock_status == EBUSY) ) {
<font color='#880000'>-    switch (lock_status) {
-      case POSIX_ABSOLUTE_TIMEOUT_INVALID:
-        rtems_set_errno_and_return_minus_one( EINVAL );
-      case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
-      case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
-        rtems_set_errno_and_return_minus_one( ETIMEDOUT );
-      case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
-        break;
-    }
</font><font color='#000088'>+    if ( lock_status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
+      rtems_set_errno_and_return_minus_one( EINVAL );
+    if ( lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
+         lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
+      rtems_set_errno_and_return_minus_one( ETIMEDOUT );
</font>   }
 
   return lock_status;
</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>