On Wed, 17 May 2023 14:51:49 GMT, Xue-Lei Andrew Fan <xue...@openjdk.org> wrote:
>> src/utils/hsdis/binutils/hsdis-binutils.c line 246: >> >>> 244: >>> 245: size_t used_size = snprintf(buf, bufsize, "%s", close); >>> 246: if ((used_size < 0) || (used_size >= bufsize)) { >> >> (used_size < 0) is tautologically false, since used_size is a size_t, so >> unsigned. I'm somewhat surprised >> this doesn't trigger a warning from some compiler. > > Updated to use `int` to replace `size_t.`. Thank you for the catching. bufsize is size_t, so that's a comparison between signed and unsigned values, which I think some compilers will warn about. Maybe the preceding check for negative is getting rid of that? But will that still occur in a slowdebug build, or will the lack of optimization lead to a warning? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13995#discussion_r1197985875