Suppress some compile warnings

This commit is contained in:
Scott Lahteine
2018-11-04 15:25:26 -06:00
parent 176654791e
commit 9c0e05552e
3 changed files with 4 additions and 5 deletions

View File

@@ -151,7 +151,7 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa
#endif
{
if (!GET_ARRAY_IS_DIGITAL(x)) {
sprintf_P(buffer, PSTR("Analog in = %5ld"), analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
sprintf_P(buffer, PSTR("Analog in = %5ld"), (long)analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
SERIAL_ECHO(buffer);
}
else {
@@ -213,7 +213,7 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa
}
else {
if (IS_ANALOG(pin)) {
sprintf_P(buffer, PSTR(" Analog in = %5ld"), analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
sprintf_P(buffer, PSTR(" Analog in = %5ld"), (long)analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
SERIAL_ECHO(buffer);
SERIAL_ECHOPGM(" ");
}