MAINT: fix implicit conversion warnings#31294
Conversation
|
I think the warning is flagging a real issue - maybe we should just fix it? Failing that, can you open an issue about the problem the warning is flagging and then add a comment here referring to that issue? |
|
Looks like the fix isn’t quite that simple |
btw I'm also happy with doing this |
|
@mattip just in case you have a quicker thought. Maybe ignoring the warning is even the best thing (so long the compiler doesn't say "this is UB, I'll do something random", I am pretty sure things are correct)... (I.e. I think the cast is only right if we cast an integer to a float. In all other cases |
|
I think the problem is on the left side, not the right side, no? |
I don't think that is the problem, we have something like a Normally all is fine:
The problem is, adding the cast fixes the last one, but breaks some of the first two. |
I opened #31540 and reverted the PR to ignore the warnings. |
|
Thanks, just adding the warning filter makes sense. Really not sure there is a nice other pattern available, TBH. |
PR summary
Fixes #31540
I get a lot of warnings from clang 22 and this PR fixes it:
No AI used.