Unverified Commit ffeca151 authored by Alexander Entinger's avatar Alexander Entinger Committed by GitHub

Merge pull request #95 from jrowberg/master

Cast pins to signed integers to avoid Wtype-limits compile warning
parents cc8daac4 c270eaab
...@@ -121,7 +121,7 @@ String::String(double value, unsigned char decimalPlaces) ...@@ -121,7 +121,7 @@ String::String(double value, unsigned char decimalPlaces)
String::~String() String::~String()
{ {
free(buffer); if (buffer) free(buffer);
} }
/*********************************************/ /*********************************************/
......
...@@ -316,7 +316,7 @@ void SoftwareSerial::begin(long speed) ...@@ -316,7 +316,7 @@ void SoftwareSerial::begin(long speed)
_tx_delay = subtract_cap(bit_delay, 15 / 4); _tx_delay = subtract_cap(bit_delay, 15 / 4);
// Only setup rx when we have a valid PCINT for this pin // Only setup rx when we have a valid PCINT for this pin
if (digitalPinToPCICR(_receivePin)) { if (digitalPinToPCICR((int8_t)_receivePin)) {
#if GCC_VERSION > 40800 #if GCC_VERSION > 40800
// Timings counted from gcc 4.8.2 output. This works up to 115200 on // Timings counted from gcc 4.8.2 output. This works up to 115200 on
// 16Mhz and 57600 on 8Mhz. // 16Mhz and 57600 on 8Mhz.
...@@ -357,7 +357,7 @@ void SoftwareSerial::begin(long speed) ...@@ -357,7 +357,7 @@ void SoftwareSerial::begin(long speed)
// Enable the PCINT for the entire port here, but never disable it // Enable the PCINT for the entire port here, but never disable it
// (others might also need it, so we disable the interrupt by using // (others might also need it, so we disable the interrupt by using
// the per-pin PCMSK register). // the per-pin PCMSK register).
*digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin)); *digitalPinToPCICR((int8_t)_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));
// Precalculate the pcint mask register and value, so setRxIntMask // Precalculate the pcint mask register and value, so setRxIntMask
// can be used inside the ISR without costing too much time. // can be used inside the ISR without costing too much time.
_pcint_maskreg = digitalPinToPCMSK(_receivePin); _pcint_maskreg = digitalPinToPCMSK(_receivePin);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment