Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.95k stars 554 forks source link

op.c: Silence compiler warning #22637

Closed khwilliamson closed 2 weeks ago

khwilliamson commented 2 weeks ago

This fixes GH #22614

Not all compilers warned on this. Make both operands unsigned. The one that had been declared signed is always non-negative anyway.

In this case, the multiple evaluations MAX gives is ok.


jkeenan commented 2 weeks ago

This patch clears up the warnings I was seeing on Linux with clang-14. @sisyphus, does it work for you on win32? @Leont, if the patch also meets your concerns, it's good to be applied.