From 138a2683f2e25afd924beeb49f241684fb5d6dc3 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Thu, 2 Feb 2023 00:51:03 +0100 Subject: [PATCH] USB: Fix Variable is assigned a value that is never used warning. Codacy. --- pcsx2/USB/usb-msd/usb-msd.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pcsx2/USB/usb-msd/usb-msd.cpp b/pcsx2/USB/usb-msd/usb-msd.cpp index aecf4246c7..fceedda3aa 100644 --- a/pcsx2/USB/usb-msd/usb-msd.cpp +++ b/pcsx2/USB/usb-msd/usb-msd.cpp @@ -729,9 +729,8 @@ namespace usb_msd int index, int length, uint8_t* data) { MSDState* s = USB_CONTAINER_OF(dev, MSDState, dev); - int ret = 0; + const int ret = usb_desc_handle_control(dev, p, request, value, index, length, data); - ret = usb_desc_handle_control(dev, p, request, value, index, length, data); if (ret >= 0) { return; @@ -743,7 +742,6 @@ namespace usb_msd case ClassInterfaceOutRequest | MassStorageReset: /* Reset state ready for the next CBW. */ s->f.mode = USB_MSDM_CBW; - ret = 0; break; case ClassInterfaceRequest | GetMaxLun: data[0] = 0;