Supressed warnings

This commit is contained in:
macbishop 2007-02-17 14:51:33 +00:00
parent 05244fae62
commit d2f767ddc7
2 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,7 @@ class MyOutput : public StdOutput
virtual void failure(CmdLineInterface& c, ArgException& e) virtual void failure(CmdLineInterface& c, ArgException& e)
{ {
static_cast<void>(c); // Ignore input, don't warn
cerr << "my failure message: " << endl cerr << "my failure message: " << endl
<< e.what() << endl; << e.what() << endl;
exit(1); exit(1);
@ -32,6 +33,7 @@ class MyOutput : public StdOutput
virtual void version(CmdLineInterface& c) virtual void version(CmdLineInterface& c)
{ {
static_cast<void>(c); // Ignore input, don't warn
cout << "my version message: 0.1" << endl; cout << "my version message: 0.1" << endl;
} }
}; };

View File

@ -4,7 +4,7 @@
using namespace TCLAP; using namespace TCLAP;
using namespace std; using namespace std;
int main(int argc, char** argv) int main(int argc, char **argv)
{ {
// Wrap everything in a try block. Do this every time, // Wrap everything in a try block. Do this every time,
// because exceptions will be thrown for problems. // because exceptions will be thrown for problems.
@ -71,7 +71,7 @@ int main(int argc, char** argv)
false, 1000,"int"); false, 1000,"int");
cmd.add( limit ); cmd.add( limit );
argv[0] = "ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough"; argv[0] = const_cast<char*>("ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough");
// Parse the args. // Parse the args.
cmd.parse( argc, argv ); cmd.parse( argc, argv );