Skip to content

fix cpu warnings#34369

Open
olpipi wants to merge 1 commit intoopenvinotoolkit:masterfrom
olpipi:cpu_warnings
Open

fix cpu warnings#34369
olpipi wants to merge 1 commit intoopenvinotoolkit:masterfrom
olpipi:cpu_warnings

Conversation

@olpipi
Copy link
Contributor

@olpipi olpipi commented Feb 26, 2026

Details:

  • item1
  • ...

Tickets:

  • ticket-id

AI Assistance:

  • AI assistance used: no / yes
  • If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).

@github-actions github-actions bot added category: Core OpenVINO Core (aka ngraph) category: CPU OpenVINO CPU plugin category: build OpenVINO cmake script / infra category: CPP API OpenVINO CPP API bindings labels Feb 26, 2026
@github-actions github-actions bot removed category: Core OpenVINO Core (aka ngraph) category: CPP API OpenVINO CPP API bindings labels Feb 26, 2026
@praasz praasz self-assigned this Feb 27, 2026
@olpipi olpipi force-pushed the cpu_warnings branch 3 times, most recently from 104e8cd to b97569f Compare March 3, 2026 18:22
@olpipi olpipi marked this pull request as ready for review March 3, 2026 18:22
@olpipi olpipi requested review from a team as code owners March 3, 2026 18:22
@olpipi olpipi changed the title [WIP] fix cpu warnings fix cpu warnings Mar 9, 2026
@olpipi olpipi force-pushed the cpu_warnings branch 3 times, most recently from a6855c7 to 91472c0 Compare March 24, 2026 17:44
@EgorDuplensky
Copy link
Contributor

EgorDuplensky commented Mar 24, 2026

@olpipi I believe this fixes -Wconversion warnings. Is this change really required?
We have clang-tidy check bugprone-narrowing-conversions which does exactly the same thing but allows to ignore some of the useless conversion warnings which are usually just kind of suppressed with static_casts.
Those static_cast bring no value besides making the code less readable in this particular case. The real fix is to have strict requirements regarding integer math, i.e. to only use int64_t or something to cover both int and size_t. But this requires much more changes.

Copy link
Contributor

@EgorDuplensky EgorDuplensky left a comment

Choose a reason for hiding this comment

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

The intent is to avoid such change if possible.
We can suppress -Wconversion warning for the cpu plugin completely because this is covered by clang-tidy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: build OpenVINO cmake script / infra category: CPU OpenVINO CPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants