This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Pass a UV to a format expecting a UV
authorTony Cook <tony@develop-help.com>
Wed, 28 Nov 2018 23:50:19 +0000 (23:50 +0000)
committerTony Cook <tony@develop-help.com>
Thu, 29 Nov 2018 00:40:22 +0000 (11:40 +1100)
commit285aa1f07d8a8489d61c81aa996588eaf8e513c5
treebf0d83d638f2ecc6e52363f2dff83b82edafb7f7
parentfdfb42a002109c363323d684cff78d54ae48eea1
Pass a UV to a format expecting a UV

MAX_LEGAL_CP can end up as int depending on the ranges of the types
involved, causing a type mismatch on the format in cp_above_legal_max.

By adding the cast to the macro definition we both prevent the type
mismatch on the format, but also may allow some static analysis tool to
detect comparisons against signed types, which is likely an error.
utf8.h