English 中文(简体)
目标C: 以前没有职能原型
原标题:Objective C - No previous prototype for function

我有2种方法向我发出警告:

id LoadObjectFromFile(NSString* filename) {
    if ((filename = DocumentPath(filename, NO))) {
        return [NSKeyedUnarchiver unarchiveObjectWithFile: filename];
    } else {
        return nil;
    }
}

BOOL saveObjectWithFile(NSString* filename, id object) {
    if ((filename = DocumentPath(filename, YES))) {
        return [NSKeyedArchiver archiveRootObject: object toFile: filename];
    } else {
        return NO;
    }
}

这给我带来了“以前没有职能原型”的警告。

I d rather not just disable the warnings in xcode.

Where am I going wrong?

最佳回答

this are C functions not objective C methods. have you defined them in the .h file?

问题回答

暂无回答




相关问题
How to suppress GCC warnings from library headers?

I have a project that uses log4cxx, boost, etc. libraries whose headers generate lots of (repetitive) warnings. Is there a way to suppress warnings from library includes (i.e. #include <some-header....

how do i get mysql warning messages in php (not error)

i want to execute a sql at php which does something like changing a text column into int column. however, this sql failed to fun at php and succeeds in my mysql admin tool (sqlyog). server responses "...

what do these ruby warnings mean?

cqq.rb:96 **warning: Statement not reached.** /root/newpackage/lib.rb:727 **warning: instance variable @object not initialized** Error: Your application used more memory than the safety cap of 500m. ...

热门标签