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
ecsignallamp.cpp:68: sequence point error ? #46
Comments
Which version have you compiled? The latest
https://github.com/ktechlab/ktechlab/blob/master/src/electronics/components/ecsignallamp.cpp#L69 |
@zoltanp can you please explain what is going on in those lines? Basically I have a problem. If I apply some voltage on the lamp and then remove it, the lamp remains lit. Some debug messages showed me that |
@UfoDriver I confirm, the issue with the signal lamp still applies. The code tries to calculate a rolling average of power dissipated on the signal lamp. Unfortunately this calculation is wrong (just verify the units of measurement, avgPower should be power ( Cross-linking with KDE bugzilla: |
@UfoDriver Fixed in git master, apparently this simple fix works: https://invent.kde.org/sdk/ktechlab/-/commit/680651eb813cecb6691bb539b3e144955e7af4c4 |
ecsignallamp.cpp:68:4: warning: operation on '((ECSignalLamp*)this)->ECSignalLamp::advanceSinceUpdate' may be undefine
d [-Wsequence-point]
Source code is
You can't increment something and read from it between sequence points.
Suggest code rework.
The text was updated successfully, but these errors were encountered: