Skip to content

Commit

Permalink
Silence Touch Bar availability warnings on Xcode 9 by using API_AVAIL…
Browse files Browse the repository at this point in the history
…ABLE.

Disable gnu-zero-variadic-macro-arguments to prevent warnings from use of API_AVAILABLE.
  • Loading branch information
ksuther committed Sep 18, 2017
1 parent 0c3994c commit 80c3452
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Configurations/ConfigCommon.xcconfig
Expand Up @@ -88,4 +88,4 @@ CLANG_ENABLE_MODULES[sdk=macosx10.8] = NO
WARNING_CFLAGS_EXTRA = -Wno-custom-atomic-properties -Wno-implicit-atomic-properties

// Turn on all warnings, then disable a few which are almost impossible to avoid
WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import $(WARNING_CFLAGS_EXTRA)
WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments $(WARNING_CFLAGS_EXTRA)
2 changes: 1 addition & 1 deletion Sparkle/SUAutomaticUpdateAlert.m
Expand Up @@ -117,7 +117,7 @@ - (NSTouchBar *)makeTouchBar
return touchBar;
}

- (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier
- (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier API_AVAILABLE(macos(10.12.2))
{
if ([identifier isEqualToString:SUAutomaticUpdateAlertTouchBarIndentifier]) {
NSCustomTouchBarItem* item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier];
Expand Down
2 changes: 1 addition & 1 deletion Sparkle/SUStatusController.m
Expand Up @@ -143,7 +143,7 @@ - (NSTouchBar *)makeTouchBar
return touchBar;
}

- (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier
- (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier API_AVAILABLE(macos(10.12.2))
{
if ([identifier isEqualToString:SUStatusControllerTouchBarIndentifier]) {
NSCustomTouchBarItem *item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier];
Expand Down
2 changes: 1 addition & 1 deletion Sparkle/SUUpdateAlert.m
Expand Up @@ -336,7 +336,7 @@ - (NSTouchBar *)makeTouchBar
return touchBar;
}

- (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier
- (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier API_AVAILABLE(macos(10.12.2))
{
if ([identifier isEqualToString:SUUpdateAlertTouchBarIndentifier]) {
NSCustomTouchBarItem* item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier];
Expand Down
2 changes: 1 addition & 1 deletion Sparkle/SUUpdatePermissionPrompt.m
Expand Up @@ -177,7 +177,7 @@ - (NSTouchBar *)makeTouchBar
return touchBar;
}

- (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier
- (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier API_AVAILABLE(macos(10.12.2))
{
if ([identifier isEqualToString:SUUpdatePermissionPromptTouchBarIndentifier]) {
NSCustomTouchBarItem* item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier];
Expand Down

0 comments on commit 80c3452

Please sign in to comment.