Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8214125

[test] Fix comparison between pointer and integer in test_ptrQueueBufferAllocator.cpp

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Introduced In Version:
      12
    • Resolved In Build:
      b21

      Description

      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());

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              simonis Volker Simonis
              Reporter:
              simonis Volker Simonis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: