<i18n dev> RFR: 8342868: Errors related to unused code on Windows after 8339120 in core libs
Naoto Sato
naoto at openjdk.org
Wed Oct 30 19:40:05 UTC 2024
On Wed, 30 Oct 2024 19:31:26 GMT, Justin Lu <jlu at openjdk.org> wrote:
>> It does seem a bug, where the return value is not handled correctly. Can you please file a separate bug?
>
>> I had a look at getLocaleInfoWrapper and it seems like it has no side effects, its only purpose is to return a value
>
> While `got` is not needed here, I am not convinced that `getLocaleInfoWrapper` is not used, so we shouldn't comment out all of the code, just remove `got`. `getLocaleInfoWrapper` updates the outbound variable `pattern` (see https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getlocaleinfoex), which is used to get the right string pattern from `fixes`.
>
> Usually, based on `got`, appropriate action is taken, but that's not needed in this case, because `pattern` is either updated or remains its fallback 0 value. So I presume that is why it is ignored in this case.
>
> We could just add that `got` removal to this patch, what do you think @naotoj?
Thanks, Justin. That is correct. Only `pattern` is relevant here. No need to check `got` so it can safely be removed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21654#discussion_r1823270103
More information about the i18n-dev
mailing list