From c6fc357c43d60abfe2096aff9b7cb52f3c718cb3 Mon Sep 17 00:00:00 2001 From: kojin Date: Sun, 29 Aug 2021 05:33:03 -0400 Subject: [PATCH] vs: fix a few compiler warnings --- pcsx2/CDVD/CDVDdiscReader.cpp | 2 +- pcsx2/DEV9/pcap_io.cpp | 2 +- pcsx2/Gif.cpp | 2 +- pcsx2/USB/usb-pad/dx/dinput-config.cpp | 2 +- pcsx2/USB/usb-pad/dx/dx.h | 7 +------ pcsx2/pcsx2.vcxproj | 2 +- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/pcsx2/CDVD/CDVDdiscReader.cpp b/pcsx2/CDVD/CDVDdiscReader.cpp index 2b54f19b3a..9cee54049c 100644 --- a/pcsx2/CDVD/CDVDdiscReader.cpp +++ b/pcsx2/CDVD/CDVDdiscReader.cpp @@ -197,7 +197,7 @@ s32 CALLBACK DISCopen(const char* pTitle) { src = std::unique_ptr(new IOCtlSrc(drive)); } - catch (std::runtime_error& ex) + catch (std::runtime_error&) { return -1; } diff --git a/pcsx2/DEV9/pcap_io.cpp b/pcsx2/DEV9/pcap_io.cpp index 651b0f8773..017209e473 100644 --- a/pcsx2/DEV9/pcap_io.cpp +++ b/pcsx2/DEV9/pcap_io.cpp @@ -298,7 +298,7 @@ int pcap_io_recv(void* packet, int max_len) if ((pcap_next_ex(adhandle, &header, &pkt_data1)) > 0) { - if (header->len > max_len) + if ((int)header->len > max_len) return -1; memcpy(packet, pkt_data1, header->len); diff --git a/pcsx2/Gif.cpp b/pcsx2/Gif.cpp index 986fb30d2d..96ac1426e6 100644 --- a/pcsx2/Gif.cpp +++ b/pcsx2/Gif.cpp @@ -140,7 +140,7 @@ int GIF_Fifo::read_fifo() GIF_LOG("GIF FIFO Read %d QW from FIFO Current Size %d", sizeRead, fifoSize); - if (sizeRead < fifoSize) + if (sizeRead < (int)fifoSize) { if (sizeRead > 0) { diff --git a/pcsx2/USB/usb-pad/dx/dinput-config.cpp b/pcsx2/USB/usb-pad/dx/dinput-config.cpp index 5a21c1ada2..ba428ea747 100644 --- a/pcsx2/USB/usb-pad/dx/dinput-config.cpp +++ b/pcsx2/USB/usb-pad/dx/dinput-config.cpp @@ -1447,7 +1447,7 @@ namespace usb_pad AddInputMap(port, (ControlID)cid, im); } } - catch (std::exception& err) + catch (std::exception&) { } diff --git a/pcsx2/USB/usb-pad/dx/dx.h b/pcsx2/USB/usb-pad/dx/dx.h index 060c0a31dc..29d048249c 100644 --- a/pcsx2/USB/usb-pad/dx/dx.h +++ b/pcsx2/USB/usb-pad/dx/dx.h @@ -15,14 +15,9 @@ #pragma once +#include #include #include - -#if !defined(DIRECTINPUT_VERSION) -#define DIRECTINPUT_VERSION 0x0800 -#endif - -#include #include #include #include diff --git a/pcsx2/pcsx2.vcxproj b/pcsx2/pcsx2.vcxproj index fe5b49857c..c24e916176 100644 --- a/pcsx2/pcsx2.vcxproj +++ b/pcsx2/pcsx2.vcxproj @@ -45,7 +45,7 @@ Use PrecompiledHeader.h NoExtensions - WIN32_LEAN_AND_MEAN;LZMA_API_STATIC;BUILD_DX=1;SPU2X_PORTAUDIO;%(PreprocessorDefinitions) + WIN32_LEAN_AND_MEAN;LZMA_API_STATIC;BUILD_DX=1;SPU2X_PORTAUDIO;DIRECTINPUT_VERSION=0x0800;%(PreprocessorDefinitions) PCSX2_DEBUG;PCSX2_DEVBUILD;_SECURE_SCL_=1;%(PreprocessorDefinitions) PCSX2_DEVEL;PCSX2_DEVBUILD;NDEBUG;_SECURE_SCL_=1;%(PreprocessorDefinitions) NDEBUG;_SECURE_SCL_=0;%(PreprocessorDefinitions)