Warningに"format not a string literal and no format arguments"と出る

NSErrorからlocalizedDescriptionを呼び出して、それをNSLog(LOGマクロ)に投げると、

ワーニングに次のような文章が出る。

LOG([NSError localizedDescription]);
format not a string literal and no format arguments

下記のようにするとwarning出ません。

LOG((@"%@",[NSError localizedDescription]);

同様に

printf(@"%",[message UTF8String]);

だとワーニングが出ますが、

printf(@"%",[message UTF8String]);

だとでませんが、今度は、

Passing arguments 1 of

というワーニングがでてきます。

implicit declaration of function

プロトタイプ宣言がない!というお叱りです。 関数呼び出しの前に関数を書くか、プロトタイプ宣言を記述しましょう。

iPhone SDK3でビルドするとコンパイルエラーする

http://tech.gowest.co.jp/?p=77

iPhone SDK 3でターゲットを「Simulator – 3.0|Debug」にしてビルドすると(プロジェクト名)_Prefix.pchファイルで以下のようなエラーが出ることがある。

error: syntax error before ‘AT_NAME’ token 
error: syntax error before ‘}’ token
fatal error: method definition not in @implementation context

原因はコンパイラーのバージョンによってiPhone OS 3.0用実行ファイルのコンパイルができないようである。 回避方法は以下の通り。

fatal error: method definition not in @implementation context – macosx.com

「method definition not in @implementation」とか出るんだけど意味がわかりません。
トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS