[clang]: cannot initialize a parameter/variable in nsCocoaWindow.mm

RESOLVED FIXED

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Nomis101, Assigned: sgreenlay)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

8 years ago
Created attachment 479838 [details]
nsCocoaWindow.mii

nsCocoaWindow.mm doesn't build with Clang because of:



/Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsCocoaWindow.mm:441:24: error: 
      cannot initialize a parameter of type 'id<NSWindowDelegate>' with an
      lvalue of type 'WindowDelegate *'
  [mWindow setDelegate:mDelegate];
                       ^~~~~~~~~
In file included from /Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsCocoaWindow.mm:40:
In file included from /Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsCocoaWindow.h:45:
In file included from /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:
In file included from /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:30:
In file included from /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFontPanel.h:8:
In file included from /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPanel.h:8:
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:284:44: note: 
      passing argument to parameter 'anObject' here
- (void)setDelegate:(id <NSWindowDelegate>)anObject;
                                           ^
/Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsCocoaWindow.mm:2258:34: warning: 
      method '-geckoWidget' not found (return type defaults to 'id')
    nsCocoaWindow *geckoWindow = [[self delegate] geckoWidget];
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsCocoaWindow.mm:2258:20: error: 
      cannot initialize a variable of type 'nsCocoaWindow *' with an rvalue of
      type 'id'
    nsCocoaWindow *geckoWindow = [[self delegate] geckoWidget];
                   ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsCocoaWindow.mm:2281:32: warning: 
      method '-geckoWidget' not found (return type defaults to 'id')
  nsCocoaWindow *geckoWindow = [[self delegate] geckoWidget];
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsCocoaWindow.mm:2281:18: error: 
      cannot initialize a variable of type 'nsCocoaWindow *' with an rvalue of
      type 'id'
  nsCocoaWindow *geckoWindow = [[self delegate] geckoWidget];
                 ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsCocoaWindow.mm:40:

Updated

8 years ago
Assignee: nobody → sgreenlay
(Assignee)

Comment 1

8 years ago
Created attachment 480736 [details] [diff] [review]
Window Delegate Patch (v1.0)
Attachment #480736 - Flags: review?(joshmoz)
(Assignee)

Updated

8 years ago
Status: NEW → ASSIGNED
(Reporter)

Comment 2

8 years ago
This also builds with Clang. And it seems this was the last file for widget/src/cocoa. I don't get any new error for widget/src/cocoa (it now builds until toolkit/xre).
(Assignee)

Comment 3

8 years ago
Can you update bug 601360 with the cumulative patch?

Updated

8 years ago
Attachment #480736 - Flags: review?(joshmoz) → review+

Updated

8 years ago
Attachment #480736 - Flags: approval2.0+
(Assignee)

Comment 4

8 years ago
Created attachment 491308 [details] [diff] [review]
Window Delegate Patch (v1.0) - commit message

Comment 5

8 years ago
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/62b716f5e267
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.