From d3f4bfe1920413f3ee7e5a977b899b888bf7029b Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Mon, 29 Jun 2026 14:04:39 -0500 Subject: [PATCH] Fix warning in OpenRGBSystemInfoPage.cpp --- i2c_tools/i2c_tools.cpp | 32 ------------------- i2c_tools/i2c_tools.h | 2 -- .../OpenRGBSystemInfoPage.cpp | 1 - 3 files changed, 35 deletions(-) diff --git a/i2c_tools/i2c_tools.cpp b/i2c_tools/i2c_tools.cpp index 9b70bd4a2..2d6b1ecec 100644 --- a/i2c_tools/i2c_tools.cpp +++ b/i2c_tools/i2c_tools.cpp @@ -134,35 +134,3 @@ std::string i2c_dump(i2c_smbus_interface * bus, unsigned char address) return text; } /* i2c_dump() */ - -/******************************************************************************************\ -* * -* i2c_read * -* * -* Prints values read from register address regaddr of a given SMBus device * -* * -* bus - pointer to i2c_smbus_interface to scan * -* address - SMBus device address to scan * -* regaddr - register address to read from * -* size - number of bytes to read * -* * -\******************************************************************************************/ - -std::string i2c_read(i2c_smbus_interface * bus, unsigned char address, unsigned char regaddr, unsigned char size) -{ - int i; - - bus->i2c_smbus_write_byte(address, regaddr); - - char line[128]; - std::string text; - - for(i = 0; i < size; i++) - { - snprintf(line, 128, "%02x ", (unsigned char)bus->i2c_smbus_read_byte(address)); - text.append(line); - } - - return text; - -} /* i2c_read() */ diff --git a/i2c_tools/i2c_tools.h b/i2c_tools/i2c_tools.h index 38e21798a..94d54a69b 100644 --- a/i2c_tools/i2c_tools.h +++ b/i2c_tools/i2c_tools.h @@ -20,5 +20,3 @@ std::string i2c_detect(i2c_smbus_interface * bus, int mode); std::string i2c_dump(i2c_smbus_interface * bus, unsigned char address); - -std::string i2c_read(i2c_smbus_interface * bus, unsigned char address, unsigned char regaddr, unsigned char size); diff --git a/qt/OpenRGBSystemInfoPage/OpenRGBSystemInfoPage.cpp b/qt/OpenRGBSystemInfoPage/OpenRGBSystemInfoPage.cpp index bc65364ef..d145bfa60 100644 --- a/qt/OpenRGBSystemInfoPage/OpenRGBSystemInfoPage.cpp +++ b/qt/OpenRGBSystemInfoPage/OpenRGBSystemInfoPage.cpp @@ -153,7 +153,6 @@ void OpenRGBSystemInfoPage::on_CommandButton_clicked() i2c_smbus_interface* bus = busses[current_index]; unsigned char address = ui->CommandAddressBox->value(); unsigned char regaddr = ui->CommandRegisterBox->value(); - unsigned char size = ui->CommandSizeBox->value(); unsigned short write_data = ui->CommandWriteDataLineEdit->text().toInt(nullptr, 0); unsigned short read_data = 0xFFFF;