Closed Bug 600901 Opened 14 years ago Closed 14 years ago

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

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Nomis101, Assigned: sgreenlay)

References

Details

Attachments

(3 files)

Attached file 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:
Assignee: nobody → sgreenlay
Attachment #480736 - Flags: review?(joshmoz)
Status: NEW → ASSIGNED
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).
Can you update bug 601360 with the cumulative patch?
Attachment #480736 - Flags: review?(joshmoz) → review+
Attachment #480736 - Flags: approval2.0+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: