Skip to content

blas_connector Warning: control reaches end of non-void function #5310

@Cstandardlib

Description

@Cstandardlib

Describe the Code Quality Issue

Description

There are some functions of code of blas_connector.cpp that is not properly terminated:

double BlasConnector::dot( const int n, const double *X, const int incX, const double *Y, const int incY, base_device::AbacusDevice_t device_type)
{
	if (device_type == base_device::AbacusDevice_t::CpuDevice) {
		return ddot_(&n, X, &incX, Y, &incY);
}
}

I propose adding a default branch (else clause or return statement) at the end to pair if-clause.

Related PR

#5242
#5301
@Critsium-xy

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Identify the specific code file or section with the code quality issue.
  • Investigate the issue and determine the root cause.
  • Research best practices and potential solutions for the identified issue.
  • Refactor the code to improve code quality, following the suggested solution.
  • Ensure the refactored code adheres to the project's coding standards.
  • Test the refactored code to ensure it functions as expected.
  • Update any relevant documentation, if necessary.
  • Submit a pull request with the refactored code and a description of the changes made.

Metadata

Metadata

Assignees

Labels

The Absolute ZeroReduce the "entropy" of the code to 0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions