RFR: 8033289: clang: clean up unused function warning (original) (raw)

Mikael Gerdin mikael.gerdin at oracle.com
Fri Jan 31 01:11:20 PST 2014


Hi,

On Thursday 30 January 2014 14.59.35 Henry Jen wrote:

Hi,

Please review the fix that clean up unused function warning produced by clang 3.4. http://cr.openjdk.java.net/~henryjen/jdk9/8033289/webrev/ One of those is used only in assert, so I wrapped it in #ifndef PRODUCT.

2793 #ifndef PRODUCT 2794 // Function only used in assert, which will be disabled with NDEBUG 2795 // ??? Somehow NDEBUG is not working, use PRODUCT

This should be #ifdef ASSERT

Assertions in hotspot are compiled in when ASSERT is defined. It's a common mistake to mix usage of #ifndef PRODUCT and ASSERT. We don't use NDEBUG in hotspot, I think you can skip the comment about the function being only used in an assert, that's quite common in the vm.

/Mikael

I had done a round of jprt along with other clang clean up, which passes all builds target. Cheers, Henry



More information about the hotspot-dev mailing list