-
Notifications
You must be signed in to change notification settings - Fork 372
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
Parse C++ warnings more specifically #1852
Conversation
@jougs 👍! I'd be very happy to review when its past the draft stage :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the few "real" warnings now, I think we can even eliminate them completely. I'll add a printout of all found warnings to this PR, but would file another one to get them fixed. |
Most of them are in a very deep part of the SLI scanner, where some case-fallthroughs may be intentional. If you dare to touch such ancient code ;). The remainder seems to come from the way be block out MPI code if building without MPI, that should be easily fixable by moving all |
@heplesser: actually, I don't dare ;-) In 1f2f5c4 I've now refactored the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jougs Thanks, just two small glitches (one confirmed by Travis, one suspected).
Maybe @diesmann would dare descend into the depths of the SLI scanner? |
Co-authored-by: Hans Ekkehard Plesser <[email protected]>
We could just try adding |
Thanks @hakonsbm. Another possibility would be to ignore those four manually and just not count them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good now and all tests have passed (macOS still running and expected to fail due to #1839). I suggest to merge this once @hakonsbm has also approved, then @lekshmideepu can merge into #1839 and all will be well again :).
I would leave them in, we handle them nicely now. The scanner code is actually quite interesting, but to figure out precisely how to replace the fall-throughs would require a deeper understanding of the state machine than I have time to acquire right now (or blatant copy-pasting of the code one calls through to). But definitely not in this PR ;). |
Argh! I went ahead and silenced them in 4c64c3c just two minutes before I saw your comment. Should I revert?
And even if you had time, I bet you'd find a a better use for it somewhere else ;-) |
Hi,
the break and the absence of it has a a clearly defined function.
As far as I remeber the case statements in the scanner code have been
carefullt designed to respect this.
Changing the code likely changes its meaning.
Regards,
Markus
…On 11/17/20 11:10 AM, Hans Ekkehard Plesser wrote:
Thanks @hakonsbm <https://github.com/hakonsbm>. Another possibility would be to ignore those four manually and just not count them.
I would leave them in, we handle them nicely now. The scanner code is actually quite interesting, but to figure out precisely how to replace the fall-throughs would require a deeper understanding of the state machine than I have time to acquire right now (or blatant copy-pasting of the code one calls through to). But definitely not in this PR ;).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1852 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADEB5FKBR7J6HDSWJEZCTE3SQJD2FANCNFSM4TXKVJBQ>.
--
Prof. Dr. Markus Diesmann, Director
Inst of Neuroscience and Medicine (INM-6) Tel +49-2461-61-4748 (secr)
Computational and Systems Neuroscience & +49-2461-61-9301 (lab)
Institute for Advanced Simulation (IAS-6) Fax +49-2461-61-9460
Theoretical Neuroscience Mob +49-175-290-1943
Jülich Research Centre and JARA Institute I
Jülich, Germany
Department of Psychiatry, Psychotherapy and Psychosomatics
School of Medicine, RWTH Aachen University
Aachen, Germany
www.nest-initiative.org www.csn.fz-juelich.de
|
No keep them in :)! |
@jougs @heplesser Isn't it better to revert and add them to the expected warnings? |
Almost a philosophical question. By exempting some, but not all warnings that are known to us, have been evaluated as not problematic and difficult to fix, we split warnings into two categories, the expliclitly ignored and the ignored-by-count. Is this split warranted, or should we treat all on an equal footing? By just considering a count, it could happen that some warnings disappear and are just replaced by other warnings, while explicit checks avoid this. One problem with the explicit warnings is that they will resurface if a change in a different part of a source file changes line numbers. Given that this blocks our CI pipeline, I am much in favor of a decent working solution now and delegation of philosophical matters to a follow-up issue. |
I suppose with only a handful warnings it is sensible to ignore them explicitly as known warnings. However, the check for known warnings doesn't work right now so the known warnings are not ignored and Travis fails. Since it's matching the whole line, the known warning strings may be missing newlines at the end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like using strip()
fixes the problem, so I'm approving.
OK. My most recent commit now also fixed the final four warnings on the Clang-build and we're down to 0 (in numbers: zero!) in all but the libneurosim-enabled build (but the two currently expected warnings there might go away with a merge of #1830). The Mac OS X build is failing expectedly due to #1839. |
Given the two positive reviews and the fact that I'm up early, I'm just merging myself. |
No description provided.