stm32/usb: Initialise cdc variable to prevent compiler warnings.

Some compilers cannot deduce that cdc will always be written before being
used.
pull/3783/head
Damien George 2018-05-15 00:18:03 +10:00
rodzic 47ecbbbecb
commit e6b66f1092
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -880,7 +880,7 @@ static uint8_t USBD_CDC_MSC_HID_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTyp
// Work out the recipient of the setup request
uint8_t mode = usbd->usbd_mode;
uint8_t recipient = 0;
usbd_cdc_state_t *cdc;
usbd_cdc_state_t *cdc = NULL;
switch (req->bmRequest & USB_REQ_RECIPIENT_MASK) {
case USB_REQ_RECIPIENT_INTERFACE: {
uint16_t iface = req->wIndex;