Skip to content

Commit

Permalink
Fix clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePopoloski committed Nov 23, 2024
1 parent e6f551c commit 2d7ee0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/numeric/SVInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1965,8 +1965,8 @@ bitwidth_t SVInt::countLeadingUnknowns() const {
else
shift = BITS_PER_WORD - bitsInMsw;

uint32_t words = getNumWords(bitWidth, false);
int i = int(words - 1);
int words = (int)getNumWords(bitWidth, false);
int i = words - 1;
bitwidth_t count = (bitwidth_t)std::countl_one(pVal[i + words] << shift);
if (count == bitsInMsw) {
for (i--; i >= 0; i--) {
Expand All @@ -1993,8 +1993,8 @@ bitwidth_t SVInt::countLeadingZs() const {
else
shift = BITS_PER_WORD - bitsInMsw;

uint32_t words = getNumWords(bitWidth, false);
int i = int(words - 1);
int words = (int)getNumWords(bitWidth, false);
int i = words - 1;
bitwidth_t count = (bitwidth_t)std::countl_one((pVal[i + words] & pVal[i]) << shift);
if (count == bitsInMsw) {
for (i--; i >= 0; i--) {
Expand Down

0 comments on commit 2d7ee0d

Please sign in to comment.