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

clear compiler warnings #3698

Merged
merged 2 commits into from
Jan 24, 2022
Merged

Conversation

wyli
Copy link
Contributor

@wyli wyli commented Jan 21, 2022

Signed-off-by: Wenqi Li wenqil@nvidia.com

Description

clear warnings such as

/MONAI/monai/csrc/filtering/permutohedral/permutohedral_cpu.cpp:469:7: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
      delete newValue;
      ^
            []
/MONAI/monai/csrc/filtering/permutohedral/permutohedral_cpu.cpp:417:26: note: allocated with 'new[]' here
    scalar_t* newValue = new scalar_t[vd * hashTable.size()];

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli requested review from ericspod, Nic-Ma and rijobro January 23, 2022 21:09
Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

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

Looks good to me.
But I am not familiar with our C++ extensions, better to have @charliebudd double confirm it.

Thanks.

@charliebudd charliebudd self-requested a review January 24, 2022 16:38
@tvercaut
Copy link
Member

I think it would be nicer to replace the c arrays by c++ objects (std::vector or std::array when possible). The current memory management seems brittle.

@wyli
Copy link
Contributor Author

wyli commented Jan 24, 2022

/build

@wyli wyli enabled auto-merge (squash) January 24, 2022 17:07
@wyli wyli merged commit c2018cf into Project-MONAI:dev Jan 24, 2022
wyli added a commit that referenced this pull request Feb 9, 2022
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
wyli added a commit that referenced this pull request Feb 9, 2022
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
wyli added a commit that referenced this pull request Feb 9, 2022
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli deleted the fixes-compiler-warnings branch April 27, 2022 22:35
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.

4 participants