Closed Bug 1588921 Opened Last month Closed 27 days ago

widget/cocoa/nsTouchBar.mm:66:10: warning: null passed to a callee that requires a non-null argument [-Wnonnull]

Categories

(Core :: Widget: Cocoa, defect)

Unspecified
macOS
defect
Not set
Points:
1

Tracking

()

RESOLVED FIXED
mozilla71
Iteration:
71.4 - Oct 14 - 20
Tracking Status
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- unaffected
firefox71 --- fixed

People

(Reporter: cpeterson, Assigned: harry)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Harry, I'm hitting the following -Wnonnull compilation errors from your patches for bug 1563349.

I just built mozilla-central for the first time after having updated to macOS 10.15 Catalina and Xcode 11.1. mach configure complained about the macOS 10.15 SDK, so I'm pointing to an older copy of the macOS 10.13 SDK in my mozconfig: ac_add_options --with-macos-sdk=/Users/chris/Code/SDKs/MacOSX10.13.sdk, if that makes a difference in how these Cocoa methods are annotated in the SDK header files.

In file included from Unified_mm_widget_cocoa2.mm:92:
firefox/widget/cocoa/nsTouchBar.mm:66:10: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
     self.customizationAllowedItemIdentifiers = nil;
          ^                                     ~~~
firefox/widget/cocoa/nsTouchBar.mm:129:37: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
       [(NSPopoverTouchBarItem*)item setCollapsedRepresentation:nil];
                                     ^                          ~~~
firefox/widget/cocoa/nsTouchBar.mm:360:18: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
     aPopoverItem.collapsedRepresentation = nil;
                  ^                         ~~~
Flags: needinfo?(htwyford)

Thanks for the report. I didn't catch these when working on my patch since I was building against the macOS 10.11 SDK, which is what we use for our widget/cocoa code. The Touch Bar APIs aren't defined until the 10.12.2 SDK, so my compiler didn't know these would be an issue.

Assignee: nobody → htwyford
Status: NEW → ASSIGNED
Iteration: --- → 71.4 - Oct 14 - 20
Points: --- → 1
Flags: needinfo?(htwyford)

Also breaking on 10.14 with the 10.13 sdk. Note that if you build locally with --enable-warnings-as-errors, because that is how infra compiles, these warnings mean the build breaks completely.

Blocks: mach-busted
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a7afcafc710a
Fix nsTouchBar build errors. r=spohl
Status: ASSIGNED → RESOLVED
Closed: 27 days ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.