Skip to content

Conversation

mgudemann
Copy link
Contributor

This fixes instances in the IC3 implementation where variables are only used for assert, leading to errors when compiling with g++ 13.3.0.
This also removes assert(false) in two instances in the IC3 implementation.

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needs formatting fixes, and #1037 should help so that the formatting guidance is provided in the GitHub action log.

@mgudemann
Copy link
Contributor Author

I'll wait for #1037 to be merged and then will rebase this.

This replaces instances of the form

```
x = f(..);
assert(x);
```

with

```
x = f(..);
INVARIANT(x, "...");
```
@mgudemann mgudemann force-pushed the fix/unused-vars-in-assert branch from c8f7102 to 675461f Compare March 26, 2025 14:09
@mgudemann mgudemann force-pushed the fix/unused-vars-in-assert branch from bbff9ef to fccec66 Compare March 26, 2025 15:36
@mgudemann mgudemann force-pushed the fix/unused-vars-in-assert branch from 24951de to e851938 Compare March 26, 2025 18:08
@@ -6,8 +6,14 @@ Author: Eugene Goldberg, eu.goldberg@gmail.com

******************************************************/

#pragma once
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't usually use this in this code base. Why is it necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it is necessary, I am not too familiar with this code to be honest.
Is it better to replace this with

#ifndef ...
#define ..

...
#endif

?
Or omit altogether if it compiles without such a guard?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of those ic3 headers appear to use a header guard, so omit altogether if it compiles, I'd say.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems that only dnf_io.hh requires a guard. The PR is update accordingly.

@tautschnig tautschnig merged commit 0ec55ad into diffblue:main Mar 28, 2025
9 checks passed
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.

2 participants