Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix internal Linter warnings #trivial #340

Merged
merged 2 commits into from
Jun 8, 2017

Conversation

maicki
Copy link
Contributor

@maicki maicki commented Jun 8, 2017

Our internal Linter caught a couple of warnings that this PR will fix. Thanks for @jerrymarino for discovering it:

...
In file included from /Users/jerry/Projects/ios/Platform/include/AsyncDisplayKit/ASDisplayNode.h:27:
/Users/jerry/Projects/ios/Platform/include/AsyncDisplayKit/ASLayoutElement.h:75:1: warning: Using assign for an ObjC pointer type is not valid. Either use strong or weak for a zeroing reference in this case.
@property (nonatomic, assign, readonly) ASLayoutElementStyle *style;
^
...
In file included from /Users/jerry/Projects/ios/Platform/include/AsyncDisplayKit/AsyncDisplayKit.h:19:
/Users/jerry/Projects/ios/Platform/include/AsyncDisplayKit/ASDisplayNode.h:649:1: warning: Using a pointer for a scalar type is invalid.
@property (nonatomic, assign, nullable) CGColorRef shadowColor;                // default=opaque rgb black
^
/Users/jerry/Projects/ios/Platform/include/AsyncDisplayKit/ASDisplayNode.h:654:1: warning: Using a pointer for a scalar type is invalid.
@property (nonatomic, assign, nullable) CGColorRef borderColor;                // default=opaque rgb black
^
...
/Users/jerry/Projects/ios/Platform/include/AsyncDisplayKit/ASDisplayNode+Subclasses.h:125:1: warning: Using assign for an ObjC pointer type is not valid. Either use strong or weak for a zeroing reference in this case.
@property (nullable, nonatomic, readonly, assign) ASLayout *calculatedLayout;
^
...
/Users/jerry/Projects/ios/Platform/include/AsyncDisplayKit/ASImageProtocols.h:166:1: warning: block property does not copy the block - use copy attribute instead
@property (nonatomic, strong, readwrite) void (^coverImageReadyCallback)(UIImage *coverImage);
^
...
/Users/jerry/Projects/ios/Platform/include/AsyncDisplayKit/ASImageProtocols.h:212:1: warning: block property does not copy the block - use copy attribute instead
@property (nonatomic, strong, readwrite) dispatch_block_t playbackReadyCallback;
^
6 warnings generated.

@garrettmoon
Copy link
Member

Thank you @maicki !

@garrettmoon garrettmoon merged commit 13c467b into master Jun 8, 2017
@appleguy appleguy deleted the MSFixLinterCompilerWarnings branch June 14, 2017 06:55
@@ -209,7 +209,7 @@ withDownloadIdentifier:(id)downloadIdentifier;
/**
@abstract Should be called when playback is ready.
*/
@property (nonatomic, strong, readwrite) dispatch_block_t playbackReadyCallback;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maicki @garrettmoon Great find! Any thoughts on why not put copy here explicitly? That would seem to match the style of most of the other changes; if anything, perhaps removing the readwrite specifier is an option too.

The copy semantics as a default are a bit less clear (since it's a special case) than the readwrite semantics (since it's always the case)

bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
* Fix internal Linter warnings

* Remove explicit copy for block as let us just use the default one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants