warning: conflicting parameter types in implementation of 'application:continueUserActivity:restorationHandler:' with OS X 10.14 SDK
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox-esr68 | --- | wontfix |
firefox68 | --- | wontfix |
firefox69 | --- | wontfix |
firefox70 | --- | fixed |
People
(Reporter: mccr8, Assigned: spohl)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file)
I think this is another new warning from bug 1560044 (showing up as an error in my build):
0:13.29 In file included from /Users/amccreight/mc/obj-dbg.noindex/toolkit/xre/Unified_mm_toolkit_xre0.mm:2:
0:13.29 /Users/amccreight/mc/toolkit/xre/MacApplicationDelegate.mm:348:46: error: conflicting parameter types in implementation of 'application:continueUserActivity:restorationHandler:': 'void (^ _Nonnull)(NSArray<id<NSUserActivityRestoring>> * _Nonnull)' vs 'void (^ _Nonnull)(NSArray )' [-Werror,-Wmismatched-parameter-types]
0:13.29 restorationHandler:(void (^)(NSArray))restorationHandler {
0:13.29 ~~~~~~~~~~~~~~~~~~ ^
0:13.29 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:405:187: note: previous definition is here
0:13.29 - (BOOL)application:(NSApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray<id<NSUserActivityRestoring>> *restorableObjects))restorationHandler NS_AVAILABLE_MAC(10_10);
0:13.29 ~~~~~~ ^
0:13.29 1 error generated.
I confirmed that this happens with the changeset bug 1560044 landed in, but I haven't confirmed this is actually the regressor. But it seems plausible.
Reporter | ||
Comment 1•5 years ago
|
||
(As with the other bug, this is with OS X 10.13.6.)
Comment 2•5 years ago
|
||
The real regressor is likely bug 1085391, and the problem is --enable-warnings-as-errors combined with 10.14 SDK. The OS you build this on is not involved.
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
The following fixes it:
--- a/toolkit/xre/MacApplicationDelegate.mm
+++ b/toolkit/xre/MacApplicationDelegate.mm
@@ -340,17 +340,17 @@ void ProcessPendingGetURLAppleEvents() {
- (BOOL)application:(NSApplication*)application
willContinueUserActivityWithType:(NSString*)userActivityType {
return [userActivityType isEqualToString:NSUserActivityTypeBrowsingWeb];
}
- (BOOL)application:(NSApplication*)application
continueUserActivity:(NSUserActivity*)userActivity
- restorationHandler:(void (^)(NSArray*))restorationHandler {
+ restorationHandler:(void (^)(NSArray<id<NSUserActivityRestoring>>*))restorationHandler {
if (![userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
return NO;
}
return [self openURL:userActivity.webpageURL];
}
- (void)application:(NSApplication*)application
... but breaks building with older SDKs.
Assignee | ||
Comment 4•5 years ago
|
||
I'm working on a fix along these lines that will still allow for building with older SDKs, but have been slowed down by various build issues on 10.15. Should have a patch shortly.
Assignee | ||
Comment 5•5 years ago
|
||
Comment 7•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 8•5 years ago
|
||
I'm thinking this is probably something we'll want to backport to make developers' lives easier?
Comment 9•5 years ago
|
||
Same as bug 1564216 comment 22.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•3 years ago
|
Description
•