Subject of the issue
After compiling the code, with the libary, I get warning from compiler about comparison between signed and unsigned integer expressions. After examining it I came to conclusion that the variable amtToWrite is the culprit, as it is int.
Your workbench
I am using Arduino Uno board, and coding in PlatformIO. The Library version I am using is 3.2.12.
Steps to reproduce
I downloaded the library and then built the code. I got the warning in the output from file SparkFun_External_EEPROM.
Expected behavior
I assume that amtToWrite could be changed to uint16_t since it is calculated from two uint16_t variables, consequently removing the compiler warning.
Actual behavior
I get this warning output. Beside that I do not know if it breaks something, as the library works for me.
.pio/libdeps/uno/SparkFun External EEPROM Arduino Library/src/SparkFun_External_EEPROM.cpp: In member function 'int ExternalEEPROM::write(uint32_t, const uint8_t*, uint16_t)':
.pio/libdeps/uno/SparkFun External EEPROM Arduino Library/src/SparkFun_External_EEPROM.cpp:888:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (uint16_t x = 0; x < amtToWrite; x++)
~~^~~~~~~~~~~~
Subject of the issue
After compiling the code, with the libary, I get warning from compiler about
comparison between signed and unsigned integer expressions. After examining it I came to conclusion that the variableamtToWriteis the culprit, as it isint.Your workbench
I am using Arduino Uno board, and coding in PlatformIO. The Library version I am using is 3.2.12.
Steps to reproduce
I downloaded the library and then built the code. I got the warning in the output from file
SparkFun_External_EEPROM.Expected behavior
I assume that
amtToWritecould be changed touint16_tsince it is calculated from twouint16_tvariables, consequently removing the compiler warning.Actual behavior
I get this warning output. Beside that I do not know if it breaks something, as the library works for me.