Skip to content

Commit 934b665

Browse files
committed
fix warning
Signed-off-by: sakumisu <[email protected]>
1 parent 5e890a0 commit 934b665

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

class/vendor/net/usbh_rtl8152.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ static void ocp_write_dword(struct usbh_rtl8152 *tp, uint16_t type, uint16_t ind
11381138
static uint16_t ocp_read_word(struct usbh_rtl8152 *tp, uint16_t type, uint16_t index)
11391139
{
11401140
uint32_t data;
1141-
uint32_t tmp;
1141+
uint32_t tmp = 0;
11421142
uint16_t byen = BYTE_EN_WORD;
11431143
uint8_t shift = index & 2;
11441144

@@ -1178,7 +1178,7 @@ static void ocp_write_word(struct usbh_rtl8152 *tp, uint16_t type, uint16_t inde
11781178
static uint8_t ocp_read_byte(struct usbh_rtl8152 *tp, uint16_t type, uint16_t index)
11791179
{
11801180
uint32_t data;
1181-
uint32_t tmp;
1181+
uint32_t tmp = 0;
11821182
uint8_t shift = index & 3;
11831183

11841184
index &= ~3;
@@ -1254,7 +1254,7 @@ static inline int r8152_mdio_read(struct usbh_rtl8152 *tp, uint32_t reg_addr)
12541254
static uint8_t usbh_rtl8152_get_version(struct usbh_rtl8152 *rtl8152_class)
12551255
{
12561256
uint8_t version;
1257-
uint32_t temp;
1257+
uint32_t temp = 0;
12581258
uint32_t ocp_data;
12591259

12601260
usbh_rtl8152_read_regs(rtl8152_class, PLA_TCR0, MCU_TYPE_PLA, 4, &temp);

platform/rtthread/usb_check.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "rtthread.h"
2+
#include "usb_config.h"
23

34
#if defined(PKG_CHERRYUSB_HOST) || defined(RT_CHERRYUSB_HOST)
45

port/dwc2/usb_hc_dwc2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,8 +1304,9 @@ static void dwc2_port_irq_handler(struct usbh_bus *bus)
13041304
{
13051305
__IO uint32_t hprt0, hprt0_dup, regval;
13061306

1307+
#if defined(CONFIG_USB_HS)
13071308
(void)regval;
1308-
1309+
#endif
13091310
/* Handle Host Port Interrupts */
13101311
hprt0 = USB_OTG_HPRT;
13111312
hprt0_dup = USB_OTG_HPRT;

0 commit comments

Comments
 (0)