hi!

This is one of the reason I did create https://www.illumos.org/issues/16804 But since 16804 is opposed, I have to set this one rolling.

So, please review: https://code.illumos.org/c/illumos-gate/+/3736

Since VERIFY() does not hint compiler in any way, there is no reason to believe the bounds check is in place and we do get the warning. So, we have two options - either suppress the warning or show compiler we have bounds check. Here, in this version, we add this extra if statement.

Thanks,
Toomas