Przeglądaj źródła

Fix compiler warnings: sketch/ConfigurationStore.cpp:17:13: warning: unused parameter 'name' [-Wunused-parameter]

 static void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size, char* name)
sketch/ConfigurationStore.cpp:45:13: warning: unused parameter 'name' [-Wunused-parameter]
 static void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size, char* name)
Marek Bel 6 lat temu
rodzic
commit
0632f3b6d8
1 zmienionych plików z 6 dodań i 4 usunięć
  1. 6 4
      Firmware/ConfigurationStore.cpp

+ 6 - 4
Firmware/ConfigurationStore.cpp

@@ -11,10 +11,11 @@
 
 #ifdef DEBUG_EEPROM_WRITE
 #define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value), #value)
+static void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size, char* name)
 #else //DEBUG_EEPROM_WRITE
-#define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value), 0)
+#define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value))
+static void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size)
 #endif //DEBUG_EEPROM_WRITE
-static void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size, char* name)
 {
 #ifdef DEBUG_EEPROM_WRITE
 	printf_P(PSTR("EEPROM_WRITE_VAR addr=0x%04x size=0x%02hhx name=%s\n"), pos, size, name);
@@ -39,10 +40,11 @@ static void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size, char* name
 
 #ifdef DEBUG_EEPROM_READ
 #define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value), #value)
+static void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size, char* name)
 #else //DEBUG_EEPROM_READ
-#define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value), 0)
+#define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value))
+static void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
 #endif //DEBUG_EEPROM_READ
-static void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size, char* name)
 {
 #ifdef DEBUG_EEPROM_READ
 	printf_P(PSTR("EEPROM_READ_VAR addr=0x%04x size=0x%02hhx name=%s\n"), pos, size, name);