souffle-lang / souffle

Soufflé is a variant of Datalog for tool designers crafting analyses in Horn clauses. Soufflé synthesizes a native parallel C++ program from a logic specification.
http://souffle-lang.github.io/
Universal Permissive License v1.0
913 stars 206 forks source link

Fix warning suppression in the json utility. #2462

Closed Xazax-hun closed 9 months ago

Xazax-hun commented 9 months ago

Properly push and pop the warning configuration to avoid unintentional side effects. The previous solution could overwrite command line options and the inclusion of the header can change what warnings are enabled.

quentin commented 9 months ago

Hi, thanks for the fix. Did you find this "problem" by manual inspection or do you run some sort of automatic checker?

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9ac6b24) 78.18% compared to head (7ea3d58) 78.19%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/souffle-lang/souffle/pull/2462/graphs/tree.svg?width=650&height=150&src=pr&token=uyaWjuodpY&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=souffle-lang)](https://app.codecov.io/gh/souffle-lang/souffle/pull/2462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=souffle-lang) ```diff @@ Coverage Diff @@ ## master #2462 +/- ## ======================================= Coverage 78.18% 78.19% ======================================= Files 486 486 Lines 32422 32422 ======================================= + Hits 25349 25352 +3 + Misses 7073 7070 -3 ``` | [Files](https://app.codecov.io/gh/souffle-lang/souffle/pull/2462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=souffle-lang) | Coverage Δ | | |---|---|---| | [src/include/souffle/utility/json11.h](https://app.codecov.io/gh/souffle-lang/souffle/pull/2462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=souffle-lang#diff-c3JjL2luY2x1ZGUvc291ZmZsZS91dGlsaXR5L2pzb24xMS5o) | `59.03% <ø> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/souffle-lang/souffle/pull/2462/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=souffle-lang)
Xazax-hun commented 9 months ago

I run into this because including this header in the project I am working on made instances of this warning appear even though we have it disabled in our project files.