Skip to content

Commit

Permalink
Fix GCC -Wreturn-type warning
Browse files Browse the repository at this point in the history
Always return false in PowersetAbstractDomain::contains()
to avoid a gcc warning. On debug builds, this will instead trigger an
assertion failure.
  • Loading branch information
Technius committed Dec 11, 2023
1 parent 49e71e5 commit 25de827
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/sparta/PowersetAbstractDomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ class PowersetAbstractDomain
return this->get_value()->contains(e);
}
}
SPARTA_ASSERT(false && "unknown AbstractValueKind");
// Return false to suppress -Wreturn-type warning reported by gcc
return false;
}

friend std::ostream& operator<<(std::ostream& o, const Derived& s) {
Expand Down

0 comments on commit 25de827

Please sign in to comment.