[openrtm-commit:02427] r2944 - branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 2月 11日 (土) 11:08:18 JST


Author: n-ando
Date: 2017-02-11 11:08:18 +0900 (Sat, 11 Feb 2017)
New Revision: 2944

Modified:
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/crc.cpp
Log:
[compat,->DEV_IQ_2016] LDRA rule "No cast for widening complex int expression (MR)." has been made a countermeasured. refs #3909

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/crc.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/crc.cpp	2017-02-11 02:07:36 UTC (rev 2943)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/crc.cpp	2017-02-11 02:08:18 UTC (rev 2944)
@@ -135,7 +135,7 @@
      *      crc32table[n] = c;
      *   }
      */
-    static const unsigned crc32tab[256] =
+    static const unsigned int crc32tab[256] =
       {
         0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
         0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
@@ -184,7 +184,7 @@
     unsigned long c(0xffffffffL);
     for (size_t i(0); i < len; ++i)
       {
-        c = crc32tab[(c ^ str[i]) & 0xff] ^ (c >> 8);
+        c = crc32tab[(0xff ^ str[i]) & 0xff] ^ (c >> 8);
       }
     return c ^ 0xffffffffL;
   }



More information about the openrtm-commit mailing list