RFR(XXS): 8214125: [test] Fix comparison between pointer and integer in test_ptrQueueBufferAllocator.cpp
Thomas Schatzl
thomas.schatzl at oracle.com
Tue Nov 20 16:13:56 UTC 2018
Hi,
On Tue, 2018-11-20 at 17:02 +0100, Volker Simonis wrote:
> Hi,
>
> can I please have a review fort he following trivial gtest fix which
> currently breaks the AIX build:
>
> http://cr.openjdk.java.net/~simonis/webrevs/2018/8214125/
> https://bugs.openjdk.java.net/browse/JDK-8214125
>
> Change JDK-8213352 introduced an gtest which does a comparison
> between
> an integer and a pointer which is forbidden in C++:
>
> ASSERT_EQ(NULL, nodes[i]->next());
>
> I don't know why other compilers havn't complained about it, but XLC
> did.
>
> The fix for this is trivial - just cast NULL to the appropriate
> pointer type:
>
> ASSERT_EQ((BufferNode*)NULL, nodes[i]->next());
>
ship it.
Thomas
More information about the hotspot-gc-dev
mailing list