All Questions
Tagged with compiler-warnings cocoa
12 questions
2
votes
2
answers
3k
views
directory not found for option '-f WARNING after updating to XCode5
Since I have updated to XCode 5 for my OSX Project I get the following warning and I don't know why and how to solve it:
Ld /Users/thomaswickl/Library/Developer/Xcode/DerivedData/QuickQuick2-...
1
vote
1
answer
1k
views
How to suppress the "dead store" compiler warning on Xcode?
How can I suppress the "dead store" warning on a single file in Xcode?
I tried
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-value"
without luck. Any suggestions?
BTW, I ...
1
vote
1
answer
2k
views
"Format string is not a string literal (potentially insecure)" [duplicate]
I'm using Xcode 4.6. My app is working on the device and the simulator, but I get a warning when building:
"Format string is not a string literal (potentially insecure)"
from this code
[sArray ...
-2
votes
1
answer
328
views
Cocoa NSUserDefaultsController: Multiple methods named 'save:' found
This question has been asked in various forms on here before, but I cannot seem to figure out what the compiler is complaining about; there are no other save: methods in the NSUserDefaultsController ...
1
vote
1
answer
1k
views
warning: comparison is always true due to limited range of data type causes crash
I have a warning that I am unable to find the cause of.
I am following instructional code in a text on Cocoa programming that implements a document based image slide show. This warning causes a ...
0
votes
4
answers
599
views
Warning: MyClass:NSObject does not implement key value observing? How can that be?
I just recently resumed work on a Cocoa project that I left a few months ago. Cocoa is a strange beast if you have not been using it for a while.
Anyway, at some point the compiler started dropping ...
1
vote
3
answers
632
views
How do warnings on undefined selectors work in Objective C?
Is there any way to make the compiler raise a warning when calling a selector that is not defined ? For example, I have this call somewhere :
methodcall time1:[[self.H1time copy] stringValue]
...
3
votes
3
answers
754
views
Cocoa - Calling a variadic method from another variadic one (NSString stringWithFormat call)
I have a problem with [NSString strigWithFormat:format] because it returns an id, and I have a lot of code where I changed a NSString var to an other personal type. But the compiler does not prevent ...
2
votes
1
answer
2k
views
Avoid "[superclass] may not respond to [selector]" warning without incurring LLVM's "Cannot cast 'super'" error
I have the following code in an NSView subclass:
- (id)forwardingTargetForSelector:(SEL)aSelector
{
if ([super respondsToSelector:@selector(forwardingTargetForSelector:)]) {
// cast to (...
2
votes
1
answer
1k
views
How to avoid "unused variable" compiler warnings with conditionally compiled NSLog replacements?
This comes out of my search for a smart variant of NSLog(). One key feature of BetterLog() is that the NSLog() replacement compiles out to nothing for release and distribution builds. The proposed ...
0
votes
1
answer
455
views
persistant '<class>' may not respond to +method
I've found a bunch of posts on this problem and have actually managed to removed one of the warnings i was getting from these however one persists.
Some context: I'm creating currency converter as an ...
0
votes
1
answer
619
views
Compiler warning when passing NSError ** as a method parameter
I've been scratching my head about this for the last 4 hours, trying out all kinds of little experiments, but I can't seem to figure out what's going wrong. Could this be a compiler bug?
Test.m:
- (...