mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-08 11:49:39 -04:00
Supressed warnings
This commit is contained in:
parent
05244fae62
commit
d2f767ddc7
@ -16,6 +16,7 @@ class MyOutput : public StdOutput
|
||||
|
||||
virtual void failure(CmdLineInterface& c, ArgException& e)
|
||||
{
|
||||
static_cast<void>(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<void>(c); // Ignore input, don't warn
|
||||
cout << "my version message: 0.1" << endl;
|
||||
}
|
||||
};
|
||||
|
@ -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<char*>("ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough");
|
||||
|
||||
// Parse the args.
|
||||
cmd.parse( argc, argv );
|
||||
|
Loading…
x
Reference in New Issue
Block a user