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

[macosx] Compile error on Mac in file NSApplicationAWT.m

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 9
    • 9
    • client-libs
    • Mac OSX 10.10.4 with Xcode 6.1

    • os_x

      On Mac 10.10.4 with Xcode 6.1 this issue appears:

      /Users/morris/hotspot/hs9/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m:387:29: error: sending 'id<NSApplicationDelegate>' to parameter of incompatible type 'id<NSFileManagerDelegate>' [-Werror]
              [NSApp setDelegate: applicationDelegate];
                                  ^~~~~~~~~~~~~~~~~~~
      /System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47: note: passing argument to parameter 'delegate' here
      @property (assign) id <NSFileManagerDelegate> delegate NS_AVAILABLE(10_5, 2_0);
                                                    ^
      1 error generated.

      This can be taken care of with the <Availability.h> facility on Mac OS X.

      Another error:

      /Users/morris/hotspot/hs9/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m:343:72: error: comparison of constant 777 with expression of type 'NSEventSubtype' (aka 'enum NSEventSubtype') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
          } else if ([event type] == NSApplicationDefined && [event subtype] == 777) {
                                                             ~~~~~~~~~~~~~~~ ^ ~~~
      1 error generated.

            serb Sergey Bylokhov
            morris Morris Meyer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: