RFR: 8338257: UTF8 lengths should be size_t not int [v5]

David Holmes dholmes at openjdk.org
Tue Aug 27 01:07:14 UTC 2024


On Mon, 26 Aug 2024 23:37:15 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Why "> 0" ?
>
> Because length is an in which could be negative but you're passing it to size_t.  -Wsign-conversion might complain because you're changing signs.  I guess you know from context that it's a positive number, so ok.

Right - array lengths must be >= 0

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20560#discussion_r1731990488


More information about the serviceability-dev mailing list