From d2f767ddc7d7f5aee9858d3c2cd6df7c472088f1 Mon Sep 17 00:00:00 2001 From: macbishop Date: Sat, 17 Feb 2007 14:51:33 +0000 Subject: [PATCH] Supressed warnings --- examples/test4.cpp | 2 ++ examples/test7.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/test4.cpp b/examples/test4.cpp index db64aba..7a9dfb2 100644 --- a/examples/test4.cpp +++ b/examples/test4.cpp @@ -16,6 +16,7 @@ class MyOutput : public StdOutput virtual void failure(CmdLineInterface& c, ArgException& e) { + static_cast(c); // Ignore input, don't warn cerr << "my failure message: " << endl << e.what() << endl; exit(1); @@ -32,6 +33,7 @@ class MyOutput : public StdOutput virtual void version(CmdLineInterface& c) { + static_cast(c); // Ignore input, don't warn cout << "my version message: 0.1" << endl; } }; diff --git a/examples/test7.cpp b/examples/test7.cpp index edbb572..19b3e41 100644 --- a/examples/test7.cpp +++ b/examples/test7.cpp @@ -4,7 +4,7 @@ using namespace TCLAP; 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, // because exceptions will be thrown for problems. @@ -71,7 +71,7 @@ int main(int argc, char** argv) false, 1000,"int"); cmd.add( limit ); - argv[0] = "ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough"; + argv[0] = const_cast("ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough"); // Parse the args. cmd.parse( argc, argv );