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 strict compiler warnings (iOS) #136

Open
HormyAJP opened this issue Feb 1, 2019 · 0 comments
Open

Fix strict compiler warnings (iOS) #136

HormyAJP opened this issue Feb 1, 2019 · 0 comments

Comments

@HormyAJP
Copy link

HormyAJP commented Feb 1, 2019

We have strict compiler warnings set on our iOS project to keep code quality high. We hit one problem with YYImage:

❌  /Users/distiller/Library/Developer/Xcode/DerivedData/harsuoanjhotjgaokoqoxnxskwpq/Build/Products/UnitTest-iphonesimulator/YYImage/YYImage.framework/Headers/YYImageCoder.h:374:54: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]

CG_EXTERN CGColorSpaceRef YYCGColorSpaceGetDeviceGray();
                                                    ^
❌  /Users/distiller/Library/Developer/Xcode/DerivedData/harsuoanjhotjgaokoqoxnxskwpq/Build/Products/UnitTest-iphonesimulator/YYImage/YYImage.framework/Headers/YYImageCoder.h:449:36: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]

CG_EXTERN BOOL YYImageWebPAvailable();

The fix is pretty simple, just need to add void to these two declarations in YYImageCoder.h

/// Returns the shared DeviceRGB color space.
CG_EXTERN CGColorSpaceRef YYCGColorSpaceGetDeviceRGB(void);

/// Returns the shared DeviceGray color space.
CG_EXTERN CGColorSpaceRef YYCGColorSpaceGetDeviceGray(void);

Happy to create a PR if given permissions, otherwise would appreciate someone making the small change 👍

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

No branches or pull requests

1 participant