Closed Bug 600900 Opened 14 years ago Closed 14 years ago

[clang]: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'NSString const in nsDragService.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 nsDragService.mii (deleted) —
nsDragService.mm doesn't build with Clang because of: /Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsDragService.mm:421:59: error: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'NSString const *' NSString* pString = [globalDragPboard stringForType:pboardType]; ^~~~~~~~~~ In file included from /Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsDragService.mm:44: In file included from /Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsDragService.h:44: 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:36: In file included from /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColor.h:32: /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:138:41: note: passing argument to parameter 'dataType' here - (NSString *)stringForType:(NSString *)dataType; ^ /Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsDragService.mm:531:57: error: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'NSString const *' if (availableType && [availableType isEqualToString:pboardType]) ^~~~~~~~~~ In file included from /Volumes/Developer/temp-clang/src/mozilla/widget/src/cocoa/nsDragService.mm:44:
Assignee: nobody → sgreenlay
Depends on changes in nsClipboard::IsStringType (583460)
Depends on: 583460
Attached patch Drag Service Patch (v1.0) (deleted) — Splinter Review
Changed const NSString * to NSString * (matches changes to nsClipboard::IsStringType in 583460). Builds under standard build system, please test under clang.
Attachment #480658 - Flags: review?(joshmoz)
Status: NEW → ASSIGNED
This also builds with Clang, I don't get the errors anymore with this patch (tested only with Apples Clang, because there seems to be a strange compiler Bug in current Clang trunk).
Attachment #480658 - Flags: review?(joshmoz) → review+
Attachment #480658 - 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: