Skip to content

Conversation

@jjerphan
Copy link
Member

Reference Issues/PRs

Towards #24875.

What does this implement/fix? Explain your changes.

Previous warnings were raised by:

  • n_iter being unused.
  • const string literals being assigned to a char *, which is not ISO C++ compliant.

Any other comments?

This duplicates some memory freeing, but I still think this is the best solution among alternatives. What do you think?

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

As much as I dislike duplicate code like this, this pattern already exist in the same file:

if(param->nu*(n1+n2)/2 > min(n1,n2))
{
free(label);
free(count);
return "specified nu is infeasible";

I left a minor comment, otherwise LGTM

Co-authored-by: Thomas J. Fan <[email protected]>
@jjerphan jjerphan force-pushed the maint/remove-warnings-vendored-cpp-code branch from fb942be to d58cc42 Compare December 1, 2022 16:14
@jeremiedbb
Copy link
Member

Merging with 2 approvals

@jeremiedbb jeremiedbb merged commit 4dde64d into scikit-learn:main Dec 2, 2022
@jjerphan jjerphan deleted the maint/remove-warnings-vendored-cpp-code branch December 2, 2022 14:06
jjerphan added a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
jjerphan added a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants