Skip to content

Comments

Fix "unqualified id" warning#15144

Merged
thinkyhead merged 1 commit intoMarlinFirmware:bugfix-2.0.xfrom
thinkyhead:bf2_fix_bp_warn_pr
Sep 3, 2019
Merged

Fix "unqualified id" warning#15144
thinkyhead merged 1 commit intoMarlinFirmware:bugfix-2.0.xfrom
thinkyhead:bf2_fix_bp_warn_pr

Conversation

@thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Sep 2, 2019

GCC doesn't like re-casting between abstract types. This PR uses a union to get byte-level access to the data structure.

CC: @p3p

@thinkyhead thinkyhead requested a review from p3p September 2, 2019 23:57
@thinkyhead thinkyhead force-pushed the bf2_fix_bp_warn_pr branch 3 times, most recently from 7c999a5 to 2c1c1a0 Compare September 3, 2019 00:11
@thinkyhead thinkyhead removed the request for review from p3p September 3, 2019 00:34
@thinkyhead thinkyhead merged commit c97c393 into MarlinFirmware:bugfix-2.0.x Sep 3, 2019
@thinkyhead thinkyhead deleted the bf2_fix_bp_warn_pr branch September 3, 2019 00:35
@p3p
Copy link
Member

p3p commented Sep 3, 2019

I think this is a case of different warning for different c++ standards and/or gcc versions, this PR introduced a warning (array bounds) in the LPC builds where there was no warnings before, the reinterpret cast approach wasn't causing any warnings but I'd only recently refactored away from the unions so it probably doesn't matter either way.

@thinkyhead
Copy link
Member Author

nevermind (missed that the header is a union). I will just suppress the warning.

@p3p
Copy link
Member

p3p commented Oct 8, 2019

Currently trying to finish this (Marlin Binary Protocol) so we don't have to remove it before you release 2.0, can't have people implementing an incomplete standard into things.. I do have it working as a fully binary protocol, (rx and tx) but still need to work around a few things, data lifetime etc, if a packet needs resent it needs to have been buffered somewhere .. memory constraints are a headache as usual.

It is nice having a completely non blocking transport layer to work with though, can transfer a file while streaming data and being able to send "instantaneous" commands at the same time.

@thinkyhead
Copy link
Member Author

Memory constraints are always annoying, but there is no substitute. On the positive side, the low-end Melzi boards have an overabundance of RAM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants