GD32f4固件库 keil工程使用的AC5 编译USB CDC例程的时候 没什么问题
但是ac5编译很慢啊 于是换成AC6 AC6编译弹出两个警告 左看又看没问题啊 提示修饰符编译被忽略
弄了很久也想不通为什么 有没有大神指导原因的?
代码:
void *usb_rxfifo_read (usb_core_regs *usb_regs, uint8_t *dest_buf, uint16_t byte_count)
{
uint32_t word_count = (byte_count + 3U) / 4U;
__IO uint32_t *fifo = usb_regs->DFIFO[0];
while (word_count-- > 0U) {
*( __packed uint32_t *)dest_buf = *fifo;
dest_buf += 4U;
}
return ((void *)dest_buf);
}
编译警告:
../../../../../Firmware/GD32F4xx_usb_library/driver/Source/drv_usb_core.c(225): warning: '__packed__' attribute ignored when parsing type [-Wignored-attributes]
*fifo = *((__packed uint32_t *)src_buf);
^~~~~~~~
../inc/usb_conf.h(184): note: expanded from macro '__packed'
#define __packed __attribute__((__packed__))
^~~~~~~~~~
../../../../../Firmware/GD32F4xx_usb_library/driver/Source/drv_usb_core.c(247): warning: '__packed__' attribute ignored when parsing type [-Wignored-attributes]
*( __packed uint32_t *)dest_buf = *fifo;
^~~~~~~~
../inc/usb_conf.h(184): note: expanded from macro '__packed'
#define __packed __attribute__((__packed__))
^~~~~~~~~~ |