Conversation

sahilk45

Resolves #6502

Description

What is the purpose of this pull request?

This PR fixes the C linting error related to an uninitialized variable in the dabs2 benchmark length test file. The fix replaces variable-length arrays with dynamically allocated memory to ensure proper initialization and memory management.

Changes made:

  • Replaced VLAs with malloc-allocated arrays
  • Added proper memory allocation checks
  • Added memory cleanup with free() calls
  • Maintained the same functionality as the original code

This pull request:

  • Fixes the C linting error related to an uninitialized variable in the dabs2 benchmark length test file.

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Maintained the same functionality as the original code

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@stdlib-botstdlib-bot addedIssue or pull request specific to math functionality.Needs ReviewA pull request which needs code review.labels Apr 2, 2025
@stdlib-bot

Coverage Report

PackageStatementsBranchesFunctionsLines
math/strided/special/dabs2$\color{green}374/374$
$\color{green}+100.00\%$
$\color{green}15/15$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}374/374$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@stdlib-botstdlib-bot added the Potential DuplicateThere might be another pull request resolving the same issue.label Jun 17, 2025
@kgrytekgryte removed Needs ReviewA pull request which needs code review.Potential DuplicateThere might be another pull request resolving the same issue.labels Jun 22, 2025
@kgryte

This PR does more than what is needed to address the upstream issue and #7370 has now been merged. As such, I will go ahead and close.

@kgrytekgryte closed this Jun 22, 2025
@kgrytekgryte added the DuplicateThis issue or pull request already exists.label Jun 22, 2025
Sign up for free to join this conversation on . Already have an account? Sign in to comment
DuplicateThis issue or pull request already exists.MathIssue or pull request specific to math functionality.
None yet

Successfully merging this pull request may close these issues.

Fix C lint errors