Skip to content

Conversation

@fpistm
Copy link
Contributor

@fpistm fpistm commented Dec 9, 2019

Firmata/Firmata.h:131:17: error: friend declaration of 'void encodeByteStream(size_t, uint8_t*, size_t) const' specifies default arguments and isn't a definition [-fpermissive]
131 | friend void FirmataMarshaller::encodeByteStream (size_t bytec, uint8_t * bytev, size_t max_bytes = 0) const;
| ^~~~~~~~~~~~~~~~~

Ref:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2000/n1263.html

Fixes #437

Firmata/Firmata.h:131:17: error: friend declaration of 'void encodeByteStream(size_t, uint8_t*, size_t) const' specifies default arguments and isn't a definition [-fpermissive]
  131 |     friend void FirmataMarshaller::encodeByteStream (size_t bytec, uint8_t * bytev, size_t max_bytes = 0) const;
      |                 ^~~~~~~~~~~~~~~~~

Ref:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2000/n1263.html

Fixes #437

Signed-off-by: Frederic Pillon <[email protected]>
@zfields
Copy link
Contributor

zfields commented Dec 10, 2019

@soundanalogous Do we know if the default value will still propogate from the declaration in FirmataMarshaller.h?

https://github.com/firmata/arduino/blob/master/FirmataMarshaller.h#L67

I think your fix is the right way to handle this, but I want to be sure we aren't breaking the API.

@soundanalogous
Copy link
Member

Do we know if the default value will still propagate from the declaration in FirmataMarshaller.h?

Not exactly sure. There are 2 instances where a 3rd parameter isn't passed to encodeByteStream if that is what you're asking. You can find them Here and here in the FirmataMarshaller implementation.

@soundanalogous
Copy link
Member

Tested with a bunch of examples from Breakout.js, didn't encounter any issues.

@soundanalogous soundanalogous merged commit 4650504 into firmata:master Dec 15, 2019
@fpistm
Copy link
Contributor Author

fpistm commented Dec 16, 2019

Thanks

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

Successfully merging this pull request may close these issues.

Build issue after arm none eabi gcc update

3 participants