Skip to content

Conversation

@vikhik
Copy link
Contributor

@vikhik vikhik commented Dec 15, 2025

Pull Request Template

Description

Fix warnings compiling with clang-21 on windows

Depends upon #1625 - marked Draft until that one is merged.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • cmake -B build . -G "Ninja Multi-Config"
  • cmake --build build -C Release

Test Configuration:

  • Windows 10
  • cmake version 3.31.6
  • ninja version 1.21.1
  • clang version 21.1.7
  • Visual Studio 2022 installed for msvcrt

@vikhik vikhik marked this pull request as draft December 15, 2025 18:46
size_t numNegativeDistances = 0;
size_t numPositiveDistances = 0;
size_t numZeroDistances = 0;
[[maybe_unused]] size_t numZeroDistances = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suppressing the warning with an attribute is still a bad idea. Either we figure out what the variable was intended to be used for and use it for that, or we get rid of it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I have done a code review and just removed the numZeroDistances related code.

@robertosfield robertosfield merged commit 4bb9909 into vsg-dev:master Dec 22, 2025
8 checks passed
@robertosfield
Copy link
Collaborator

These changes with the numZeroDistances code removal by me are now merged with VSG master.

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.

3 participants