Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Fix conflicting parameter types in definition warnings #11

Open
evandcoleman opened this issue Feb 5, 2016 · 3 comments
Open

Fix conflicting parameter types in definition warnings #11

evandcoleman opened this issue Feb 5, 2016 · 3 comments

Comments

@evandcoleman
Copy link

At Timehop we build our app with the -Weverything flag and the DeskApiClient produces a lot of warnings that we don't feel comfortable suppressing. We've created our own fork of this repo and have manually disabled this warning using #pragma clang diagnostic ignored in each offending file. But an ideal solution would be to fix the warnings.

To reproduce the problem you can add -Woverriding-method-mismatch to Other Warning Flags in the Xcode build settings.

@nartiles
Copy link
Contributor

nartiles commented Feb 8, 2016

We created an internal work item to address this in the future. We'll definitely take a look at cleaning up these warnings. Thanks!

@mergesort
Copy link

@nartiles Just wondering if there's been any progress on this. Thanks a lot!

@nartiles
Copy link
Contributor

@mergesort We took a look at the warnings and they are not valid. We set the appropriate class at runtime of these DSAPIResource subclasses to match what's in the method names so these are fake warning. See

DSAPIResource.m, - (instancetype)initWithDictionary:(NSDictionary *)dictionary client:(DSAPIClient *)client
...
// Set the class of the object to the class returned by the web service for self
   object_setClass(self, [self.client classForClassName:_dictionary[kLinksKey][kSelfKey][kClassKey]]);

It is safe to suppress them. We have no plans to add #pragma statements at this time to suppress this.

Instead of forking your own code to suppress these, we recommend you simply use Inhibit all warnings on the DeskAPIClient framework or pod.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants