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

Fix warning "converting to non-pointer type 'bool' from NULL" in arraycopynode.cpp

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b55

      Backports

        Description

        For the following code in arraycopynode.cpp which was introduced by JDK-6912521:

        bool ArrayCopyNode::finish_transform(...) {
        ...
            if (in(TypeFunc::Control) != ctl) {
        ...
              return NULL;
            }
        }

        older versions of GCC and maybe other compilers warn about:

        /arraycopynode.cpp:458: warning: converting to non-pointer type 'bool' from NULL

        The fix is trivial - just return false instead of NULL as this is already done in several other places in the same function.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: