RFR(XXS): 8214125: [test] Fix comparison between pointer and integer in test_ptrQueueBufferAllocator.cpp
thomas.stuefe at gmail.com
Tue Nov 20 16:40:09 UTC 2018
Looks good and trivial.
I remember running into this before, see 8171225. What I do not understand
is, should NULL not be (void*)0 according to Posix:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html ? So
this should be a pointer-pointer comparison.
Maybe we just miss include <stddef.h> somehow on AIX?
On Tue, Nov 20, 2018, 17:03 Volker Simonis <volker.simonis at gmail.com wrote:
> can I please have a review fort he following trivial gtest fix which
> currently breaks the AIX build:
> 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
> ASSERT_EQ((BufferNode*)NULL, nodes[i]->next());
> Thank you and best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev