Skip to content

Commit

Permalink
More static casting for indices
Browse files Browse the repository at this point in the history
  • Loading branch information
itopcuoglu committed Jul 31, 2024
1 parent 939f370 commit 4f06fef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CartBlock.C
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ void CartBlock::insertInInterpList(
}
if (donor_frac == nullptr) {
listptr->nweights = 8;
listptr->weights =
(double*)malloc(sizeof(double) * (listptr->nweights * 2));
listptr->weights = (double*)malloc(
sizeof(double) * (static_cast<int>(listptr->nweights * 2)));
listptr->inode =
(int*)malloc(sizeof(int) * (listptr->nweights * 2 * 3));

Check warning on line 265 in src/CartBlock.C

View workflow job for this annotation

GitHub Actions / Lint-clang-tidy

performing an implicit widening conversion to type 'unsigned long' of a multiplication performed in type 'int' [bugprone-implicit-widening-of-multiplication-result]

Expand Down

0 comments on commit 4f06fef

Please sign in to comment.