Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
iOS Development
How To Get Rid Of Unused Variable Warning?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Mark FX" data-source="post: 1396731" data-attributes="member: 211556"><p>Not sure exactly what your question is, but if it's about not getting warnings for your unused</p><p>timer variable you have two obvious options.</p><p></p><p>first you can disable the warnings for unused variables in the project build settings, under</p><p>the Apple LLVM compiler 3.0 - warnings heading, make sure you only switch these off for</p><p>the project, and not for the target app, but be warned this is not advised as you will not</p><p>get any warnings about unused variables throughout any your project files.</p><p></p><p>Second you could use the timer variable in an NSLog statement to get rid of the warnings,</p><p>even though the log statement has no other debug purposes, like this.</p><p></p><p>[CODE]</p><p>NSLog(@"time interval = %f", [timer timeInterval]);</p><p>[/CODE</p><p></p><p>Hope this is of some help.</p><p></p><p>Regards mark[/CODE]</p></blockquote><p></p>
[QUOTE="Mark FX, post: 1396731, member: 211556"] Not sure exactly what your question is, but if it's about not getting warnings for your unused timer variable you have two obvious options. first you can disable the warnings for unused variables in the project build settings, under the Apple LLVM compiler 3.0 - warnings heading, make sure you only switch these off for the project, and not for the target app, but be warned this is not advised as you will not get any warnings about unused variables throughout any your project files. Second you could use the timer variable in an NSLog statement to get rid of the warnings, even though the log statement has no other debug purposes, like this. [CODE] NSLog(@"time interval = %f", [timer timeInterval]); [/CODE Hope this is of some help. Regards mark[/CODE] [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
iOS Development
How To Get Rid Of Unused Variable Warning?
Top