mirror of https://github.com/PCSX2/pcsx2.git
Fix several gcc warnings. (#5232)
This commit is contained in:
parent
6bdfec743c
commit
95c8915d78
|
@ -1516,7 +1516,7 @@ namespace usb_pad
|
||||||
// 0x0982 - PlayStation 2
|
// 0x0982 - PlayStation 2
|
||||||
// 0x0984 - ???
|
// 0x0984 - ???
|
||||||
|
|
||||||
static uint8_t gametrak_dev_descriptor[] = {
|
[[maybe_unused]] static uint8_t gametrak_dev_descriptor[] = {
|
||||||
0x12, // bLength
|
0x12, // bLength
|
||||||
0x01, // bDescriptorType (Device)
|
0x01, // bDescriptorType (Device)
|
||||||
0x10, 0x01, // bcdUSB 1.10
|
0x10, 0x01, // bcdUSB 1.10
|
||||||
|
|
|
@ -192,8 +192,8 @@ namespace usb_printer
|
||||||
const uint8_t print_compl[] = {0x1b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00};
|
const uint8_t print_compl[] = {0x1b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
|
|
||||||
PrinterState* s = (PrinterState*)dev;
|
PrinterState* s = (PrinterState*)dev;
|
||||||
const uint8_t ep_nr = p->ep->nr;
|
//const uint8_t ep_nr = p->ep->nr;
|
||||||
const uint8_t ep_type = p->ep->type;
|
//const uint8_t ep_type = p->ep->type;
|
||||||
|
|
||||||
switch (p->pid)
|
switch (p->pid)
|
||||||
{
|
{
|
||||||
|
@ -233,7 +233,7 @@ namespace usb_printer
|
||||||
case USB_TOKEN_IN:
|
case USB_TOKEN_IN:
|
||||||
if (s->cmd_state == 0 && s->last_command_size > 0)
|
if (s->cmd_state == 0 && s->last_command_size > 0)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < sizeof(commands) / sizeof(commands[0]); i++)
|
for (uint32_t i = 0; i < sizeof(commands) / sizeof(commands[0]); i++)
|
||||||
{
|
{
|
||||||
if (s->last_command[1] == 0xCF)
|
if (s->last_command[1] == 0xCF)
|
||||||
{
|
{
|
||||||
|
@ -272,7 +272,7 @@ namespace usb_printer
|
||||||
{
|
{
|
||||||
PrinterState* s = new PrinterState();
|
PrinterState* s = new PrinterState();
|
||||||
std::string api = *PrinterDevice::ListAPIs().begin();
|
std::string api = *PrinterDevice::ListAPIs().begin();
|
||||||
int subtype = GetSelectedSubtype(std::make_pair(port, TypeName()));
|
uint32_t subtype = GetSelectedSubtype(std::make_pair(port, TypeName()));
|
||||||
if (subtype >= sizeof(sPrinters) / sizeof(sPrinters[0])) {
|
if (subtype >= sizeof(sPrinters) / sizeof(sPrinters[0])) {
|
||||||
subtype = 0;
|
subtype = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,15 +98,15 @@ namespace usb_printer
|
||||||
|
|
||||||
struct PrinterData
|
struct PrinterData
|
||||||
{
|
{
|
||||||
PrinterModel model;
|
const PrinterModel model;
|
||||||
char* commercial_name;
|
const char* commercial_name;
|
||||||
const uint8_t* device_descriptor;
|
const uint8_t* device_descriptor;
|
||||||
const int device_descriptor_size;
|
const int device_descriptor_size;
|
||||||
const uint8_t* config_descriptor;
|
const uint8_t* config_descriptor;
|
||||||
const int config_descriptor_size;
|
const int config_descriptor_size;
|
||||||
const USBDescStrings usb_strings;
|
const USBDescStrings usb_strings;
|
||||||
char* device_id;
|
const char* device_id;
|
||||||
PrinterProtocol protocol;
|
const PrinterProtocol protocol;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const PrinterData sPrinters[] = {
|
static const PrinterData sPrinters[] = {
|
||||||
|
@ -149,7 +149,7 @@ namespace usb_printer
|
||||||
static std::vector<std::string> SubTypes()
|
static std::vector<std::string> SubTypes()
|
||||||
{
|
{
|
||||||
std::vector<std::string> ret;
|
std::vector<std::string> ret;
|
||||||
for (int i = 0; i < sizeof(sPrinters) / sizeof(sPrinters[0]); i++)
|
for (uint32_t i = 0; i < sizeof(sPrinters) / sizeof(sPrinters[0]); i++)
|
||||||
{
|
{
|
||||||
ret.push_back(sPrinters[i].commercial_name);
|
ret.push_back(sPrinters[i].commercial_name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue