Skip to content

compile warnings from SoftwareSerial from use of always_inline #4078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ahdavidson opened this issue Nov 4, 2015 · 2 comments
Closed

compile warnings from SoftwareSerial from use of always_inline #4078

ahdavidson opened this issue Nov 4, 2015 · 2 comments
Assignees
Milestone

Comments

@ahdavidson
Copy link

When compiling a sketch that uses SoftwareSerial with Arduino 1.6.5 and compiler warnings set to default, I get the following warnings:

/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SoftwareSerial/SoftwareSerial.cpp:375:6: warning: always_inline function might not be inlinable [-Wattributes]
void SoftwareSerial::setRxIntMsk(bool enable)
^
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SoftwareSerial/SoftwareSerial.cpp:121:6: warning: always_inline function might not be inlinable [-Wattributes]
void SoftwareSerial::recv()
^

@NicoHood
Copy link
Contributor

NicoHood commented Nov 5, 2015

From what I remember in my always inline attempts:

  • You need to mark the definition inline inline void foo __attribute__((__always_inline__));
  • You need NOT to mark the implementation inline void foo { code }

So basically I think you need to move the inline marker from the .cpp to the .h file. (Havent tested it)

sandeepmistry added a commit to sandeepmistry/Arduino that referenced this issue Nov 5, 2015
sandeepmistry added a commit to sandeepmistry/Arduino that referenced this issue Nov 5, 2015
@sandeepmistry
Copy link
Contributor

Closed via 12ebdfe

@ffissore ffissore modified the milestone: Release 1.6.7 Nov 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants