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

-Wlogical-not-parentheses warnings in JRSUIConstantSync.m

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Resolved In Build:
      b127

      Description

      In Mac OS X with Xcode 7.3, building java.desktop produces hundreds of lines of warnings like this:

      /Users/dan/Dev/jdk/jdk9/jdk/src/java.desktop/macosx/native/libosxui/JRSUIConstantSync.m:132:5: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
          CONSISTENCY_CHECK(Key, value);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /Users/dan/Dev/jdk/jdk9/jdk/src/java.desktop/macosx/native/libosxui/JRSUIConstantSync.m:96:10: note: expanded from macro 'CONSISTENCY_CHECK'
          if ( !CONSTANT_CHECK(clazz, constant) ) return NO;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /Users/dan/Dev/jdk/jdk9/jdk/src/java.desktop/macosx/native/libosxui/JRSUIConstantSync.m:132:5: note: add parentheses after the '!' to evaluate the comparison first

      It appears innocent, but produces a lot of noise (and, if I configure without "--disable-warnings-as-errors", breaks the build).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dlsmith Dan Smith
                Reporter:
                dlsmith Dan Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: