Skip to content
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

Only check error if function is called #2444

Merged
merged 1 commit into from
Oct 1, 2021
Merged

Only check error if function is called #2444

merged 1 commit into from
Oct 1, 2021

Conversation

dschwoerer
Copy link
Contributor

While this shouldn't change anything, it avoids a warning, and is
potentially less confusing.

While this shouldn't change anything, it avoids a warning, and is
potentially less confusing.
@dschwoerer dschwoerer added the small-change Changes less than 100 lines - should be quick to review label Oct 1, 2021
Copy link
Member

@ZedThree ZedThree left a comment

Choose a reason for hiding this comment

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

This is why we should always use braces! :)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -856,7 +856,9 @@ PetscErrorCode PetscMonitor(TS ts, PetscInt UNUSED(step), PetscReal t, Vec X, vo
/* Duplicate the solution vector X into a work vector */
ierr = VecDuplicate(X,&interpolatedX);CHKERRQ(ierr);
while (s->next_output <= t && s->next_output <= tfinal) {
if (s->interpolate) ierr = TSInterpolate(ts,s->next_output,interpolatedX);CHKERRQ(ierr);
if (s->interpolate){
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: implicit conversion PetscBool -> bool [readability-implicit-bool-conversion]

if (s->interpolate){
    ^
                   != 0u

@bendudson bendudson merged commit a5948f0 into next Oct 1, 2021
@bendudson bendudson deleted the warning-fix branch October 1, 2021 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small-change Changes less than 100 lines - should be quick to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants