STM32 Fixed warning related to __packed redefinition

Before this patch, many warnings like below were generated
during compilation with ArmCC
[Warning] lwip_ethernet.h@57,0:  #3135-D: attribute does not apply to any entity

This happens here as ``--gnu`` option of ArmCC is being used, which
enables the GNU compiler extensions that the ARM compiler supports.

This is solve by adding a extra check on __CCARM .
pull/4236/head
Laurent MEUNIER 2017-04-27 10:32:00 +02:00
parent 0b5b6cba71
commit 4eea8fa863
9 changed files with 9 additions and 9 deletions

View File

@ -124,7 +124,7 @@ typedef enum
}while (0)
#endif /* USE_RTOS */
#if defined ( __GNUC__ )
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */

View File

@ -124,7 +124,7 @@ typedef enum
}while (0)
#endif /* USE_RTOS */
#if defined ( __GNUC__ )
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */

View File

@ -145,7 +145,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
}
#if defined ( __GNUC__ )
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */

View File

@ -144,7 +144,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
}
#if defined ( __GNUC__ )
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */

View File

@ -146,7 +146,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
#endif /* USE_RTOS */
#if defined ( __GNUC__ )
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */

View File

@ -145,7 +145,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
}
#if defined ( __GNUC__ )
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */

View File

@ -127,7 +127,7 @@ typedef enum
}while (0)
#endif /* USE_RTOS */
#if defined ( __GNUC__ )
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */

View File

@ -124,7 +124,7 @@ typedef enum
}while (0)
#endif /* USE_RTOS */
#if defined ( __GNUC__ )
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */

View File

@ -147,7 +147,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
}
#if defined ( __GNUC__ )
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */