Closed Bug 1588921 Opened 5 years ago Closed 5 years 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
normal
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: bugzilla)

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
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: