Преглед изворни кода

add volatile to EPx_REGS for -Wcast-qual

since gcc does difference between volatile struct and member when
casting pointer
hathach пре 4 година
родитељ
комит
099d3b377f
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/portable/dialog/da146xx/dcd_da146xx.c

+ 1 - 1
src/portable/dialog/da146xx/dcd_da146xx.c

@@ -140,7 +140,7 @@ typedef struct
     __IOM uint32_t USB_RXC2_REG;                 /*!< (@ 0x000000DC) Receive Command Register 2    */
     __IOM uint32_t USB_RXC3_REG;                 /*!< (@ 0x000000FC) Receive Command Register 3    */
   };
-} EPx_REGS;
+} volatile EPx_REGS;
 
 #define EP_REGS(first_ep_reg) (EPx_REGS*)(&USB->first_ep_reg)