Skip to content

[BUG] Fix CodeQL warnings #1826

@Panquesito7

Description

@Panquesito7

Description

Currently, there are many CodeQL warnings. LGTM is marking our code quality as B. We need to get it higher (link: https://lgtm.com/projects/g/TheAlgorithms/C-Plus-Plus/alerts/?mode=list).

Expected behavior

We should fix all the CodeQL/LGTM warnings.

Actual behavior

LGTM is reporting 7 alerts, which marks our quality code as B.

Possible fix

Fix all the CodeQL/LGTM warnings.

Steps to reproduce

  1. Go to https://lgtm.com/projects/g/TheAlgorithms/C-Plus-Plus/alerts/?mode=list.
  2. You will see all the warnings CodeQL is reporting, which makes it easier for us to fix them.
  3. There's a help button in case you need help or are confused with that error.

Context

Having bugs in our code (even minimal bugs) can make it all go wrong or simply affect other students/people reading and understanding our algorithms.

Additional information

Nope.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions