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

Clang warns about pointless comparisons

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • b27

      ```
      /cgroupV1Subsystem_linux.cpp:290:7: warning: comparison of array 'pidsmax' equal to a null pointer is always false [-Wtautological-pointer-compare]
        if (pidsmax == NULL) {
            ^~~~~~~ ~~~~
      /shared/projects/openjdk/jdk-jdk/source/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:95:7: warning: comparison of array 'cpus' equal to a null pointer is always false [-Wtautological-pointer-compare]
        if (cpus == NULL) {
            ^~~~ ~~~~
      /shared/projects/openjdk/jdk-jdk/source/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:104:7: warning: comparison of array 'quota' equal to a null pointer is always false [-Wtautological-pointer-compare]
        if (quota == NULL) {
            ^~~~~ ~~~~
      /shared/projects/openjdk/jdk-jdk/source/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:113:7: warning: comparison of array 'mems' equal to a null pointer is always false [-Wtautological-pointer-compare]
        if (mems == NULL) {
            ^~~~ ~~~~
      /shared/projects/openjdk/jdk-jdk/source/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:154:7: warning: comparison of array 'mem_soft_limit_str' equal to a null pointer is always false [-Wtautological-pointer-compare]
        if (mem_soft_limit_str == NULL) {
            ^~~~~~~~~~~~~~~~~~ ~~~~
      /shared/projects/openjdk/jdk-jdk/source/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:179:7: warning: comparison of array 'mem_swp_limit_str' equal to a null pointer is always false [-Wtautological-pointer-compare]
        if (mem_swp_limit_str == NULL) {
            ^~~~~~~~~~~~~~~~~ ~~~~
      /shared/projects/openjdk/jdk-jdk/source/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:189:7: warning: comparison of array 'mem_swp_current_str' equal to a null pointer is always false [-Wtautological-pointer-compare]
        if (mem_swp_current_str == NULL) {
            ^~~~~~~~~~~~~~~~~~~ ~~~~
      /shared/projects/openjdk/jdk-jdk/source/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:219:7: warning: comparison of array 'mem_limit_str' equal to a null pointer is always false [-Wtautological-pointer-compare]
        if (mem_limit_str == NULL) {
            ^~~~~~~~~~~~~ ~~~~
      /shared/projects/openjdk/jdk-jdk/source/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:248:7: warning: comparison of array 'pidsmax' equal to a null pointer is always false [-Wtautological-pointer-compare]
        if (pidsmax == NULL) {
            ^~~~~~~ ~~~~
      ```

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: