Closed Bug 1326472 Opened 9 years ago Closed 9 years ago

Compile warning introduced by bug 1309596

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: spohl, Assigned: spohl)

References

Details

Attachments

(1 file, 1 obsolete file)

0:05.95 Warning: -Wnonnull in /Users/Stephen/Documents/mozilla-central/widget/cocoa/nsDragService.mm: null passed to a callee that requires a non-null argument 0:05.95 /Users/Stephen/Documents/mozilla-central/widget/cocoa/nsDragService.mm:695:17: warning: null passed to a callee that requires a non-null argument [-Wnonnull] 0:05.95 [aSession enumerateDraggingItemsWithOptions:NSDraggingItemEnumerationConcurrent 0:05.95 ^ 0:06.76 1 warning generated.
Uh oh. I think we can pass mNativeDragView to forView: and @{} to searchOptions:.
Flags: needinfo?(enndeakin)
I think it is the null searchOptions that causes this, despite Apple examples using nil as well.
Flags: needinfo?(enndeakin)
Attached patch PatchSplinter Review
It looks indeed like this compile warning is caused by a null searchOptions. This may have been incorrectly marked as requiring a non-null argument by Apple (see https://forums.developer.apple.com/thread/17954). This patch fixes the warning.
Assignee: enndeakin → spohl.mozilla.bugs
Status: NEW → ASSIGNED
Attachment #8823666 - Flags: review?(mstange)
Comment on attachment 8823666 [details] [diff] [review] Patch Review of attachment 8823666 [details] [diff] [review]: ----------------------------------------------------------------- I think we should pass something to forView as well. Do you know why it's not warning for that argument?
Attached patch Patch (obsolete) — Splinter Review
I don't, but your suggestion sounds good.
Attachment #8823666 - Attachment is obsolete: true
Attachment #8823666 - Flags: review?(mstange)
Attachment #8823668 - Flags: review?(mstange)
The documentation for enumerateDraggingItemsWithOptions says that "A view value of nil means the screen coordinate space.", but doesn't mention that nil is allowed for searchOptions.
Comment on attachment 8823668 [details] [diff] [review] Patch So setting both to nil won't work since the coordinates are now incorrect.
Attachment #8823668 - Flags: review?(mstange) → review-
Ah, I see.
Attachment #8823666 - Attachment is obsolete: false
Attachment #8823666 - Flags: review+
Attachment #8823668 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: