Dave's Brain

Browse - Programming Tips - How can I avoid warnings like "ident is declared but never used" ?

Date: 2017feb11
Product: Borland C++ 5.02
Language: C/C++

Q.  How can I avoid warnings like "<ident> is declared but never used" ?

A.
To disable this warning
#pragma warn -use void ThisFunctionIsNotUsed() { printf("hello\n"); }
To restore the warning it its previous condition
#pragma warn .use
To turn on the warning
#pragma warn +use

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.