Sfoglia il codice sorgente

CMSIS-Core: Fixed possible compiler/misra warnings on IAR CLZ workaround.

Jonatan Antoni 8 anni fa
parent
commit
00a8e154d7
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      CMSIS/Core/Include/cmsis_compiler.h

+ 1 - 1
CMSIS/Core/Include/cmsis_compiler.h

@@ -125,7 +125,7 @@
   // various versions of the IAR compilers.
   // __IAR_FEATURE_CLZ__ should be defined by
   // the compiler that supports __CLZ internally.
-  #if __ARM_ARCH_6M__ && !__IAR_FEATURE_CLZ__
+  #if (defined (__ARM_ARCH_6M__)) && (__ARM_ARCH_6M__ == 1) && (!defined (__IAR_FEATURE_CLZ__))
     __STATIC_INLINE uint32_t __CLZ(uint32_t data)
     {
       if (data == 0u) { return 32u; }